recordset.movelast无法正常工作 [英] recordset.movelast not working

查看:83
本文介绍了recordset.movelast无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,有人可以帮我解决我的问题.我在vb6中使用adodb创建了一个程序.问题是当我使用.movelast语句移动光标时,它不起作用.
例如我在autonumber中有一个orno字段
1
2
.
.
.
44
当我使用movelast时,它最多只能读到39,最后一个数字是39,但它应该是44

谢谢..

hello can anyone help me about my problem. i created a program using adodb in vb6. the problem is when i move the cursor using the .movelast statement it doesnt work.
for example i have a field orno in autonumber
1
2
.
.
.
44
when i used movelast it only read upto 39 to the last number is 39 but it should be 44

thanks..

推荐答案

问题是,并不是所有的数据库驱动程序都支持完整的ado方法集.对于某些记录,仅在首先调用MoveLast的情况下,RecordCount才能提供准确的信息.当您遇到时,此方法无法正常工作.这意味着您必须即兴创作才能获得兼容的结果.您可以实现自己的方法,只需执行以下操作:
The problem is that not all database drivers supports the complete set of ado methods. For some the RecordCount only gives accurate information if MoveLast is called first. As you encounter, this method isn''t working correctly. This means you have to improvise to to get compatible results. You could implement your own method and simply do:
do until rs.Eof 
  rs.MoveNext
loop



此链接对此有一些不错的信息:
http://flylib.com/books/zh-CN/3.405.1.32/1/ [ ^ ]

祝你好运!



This link has some nice info on this:
http://flylib.com/books/en/3.405.1.32/1/[^]

Good luck!


这篇关于recordset.movelast无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆