欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 关于VBS中RecordSet的Seek和Find

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有5805人关注过本帖树形打印复制链接

主题:关于VBS中RecordSet的Seek和Find

帅哥哟,离线,有人找我吗?
王锋
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2013/3/20 9:25:10 [显示全部帖子]

这是百度上搜到的信息,希望读你有用

 

The Seek method searches the index of a Recordset to find a record that matches the values specified in the keyvalues parameter. If there is a match, the pointer will point to the record specified by the seekoption parameter. If there is no match, the record pointer will be placed at the end of the Recordset.
Seek的作用是:搜索一个记录集的index[索引],从中查找与keyvalues参数中指定的值相匹配的一条记录。如果找到了匹配对象,那么记录指针将指向seekoption参数指定的记录;如果未找到匹配对象,那么记录指针将定位在记录集的末尾处。

Note: To use this method, the provider must support this method and the use of indexes on a Recordset (the Index property). Use the Supports method to determine whether the provider supports seek and indexes.
注意:使用这个方法的前提是:技术提供对象[provider]必须支持这个方法,并且必须在一个记录集参数(索引[index]属性中)中使用索引[index];使用Supports方法可以用来确定技术提供对象[provider]是否支持Seek和index方法。

Note: Set the Index property to the desired index before executing this method.
注意:必须在这个方法执行之前将index属性设置为你希望的index值。

Note: This method can only be used with server-side cursors (not supported when the CursorLocation property value is adUseClient).
注意:这个方法只能用于服务器端的记录指针(当CursorLocation属性值为adUseClient时,则不能获得支持)。

Note: This method can only be used when the Recordset object was opened with the CommandTypeEnum value of adCmdTableDirect.
注意:只有当Recordset对象以adCmdTableDirect中的CommandTypeEnum值打开时,才能使用这个方法。



金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
王锋
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2013/3/20 13:28:56 [显示全部帖子]

试试将数据库表字段上加上索引和主键后看看。

ADO的开发都是一样的,你也考虑先在ACCESS上进行开发,等通过后再把代码移植到金字塔



金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
王锋
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2013/3/20 15:45:45 [显示全部帖子]

金字塔所用的VBA实际上是VBS引擎,开发ADO数据的代码完全一致,你也考虑在其他的有关数据的编程论坛递交一下这个问题。


金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部