如何利用VB6来实现一个记录数据集合的循环,要求是从下往上读取数据? 如何利用VB6来实现一个记录数据集合的循环,要求是从下往上读取数据?采用LISTBOX控件,在它里面实现就行了。哪位高手知道,帮帮忙。谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 從下往上讀會快很多不用 EOF 以加快记录循环 通常我们使用以下的代码进行记录循环:Do while not records.eofcombo1.additem records![Full Name]records.movenextloop 结果是每个循环中数据库都要进行一次数据结束测试。在大量的记录的情况下, 浪费的时间相当大。 而使用以下的代码, 可以提高近 1/3 的速度:records.movelastintRecCount=records.RecordCountrecords.movefirstfor intCounter=1 to intRecCountcombo1.additem records![Full Name]records.movenextnext intCounter返回 晕,居然老兄喜欢从下往上读数据。Do while not records.eofcombo1.additem records![Full Name]records.movenextloop 结果是每个循环中数据库都要进行一次数据结束测试。在大量的记录的情况下, 浪费的时间相当大。 而使用以下的代码, 可以提高近 1/3 的速度:rst.movelastwhile not rst.bof list1.additem rst(0) rst.movepreviouswendrst.close rst.movelastwhile not rst.bof list1.additem rst(0) rst.movepreviouswendrst.close rs.movelastwhile rs.bof<>true list1.additem rs(0) rs.movepreviouswend除了这样以外,游标类型以及锁还应该定义吧??? rs.movelastwhile not rs.bof '访问当前记录集 rs.movepreviouswend 刚学vb该学什么。 spread里作为输入日期的这一整列怎么让它能自动选择日期,不用手动输入? 如何在声音播放时,让两个喇叭播放同一声道的声音?(详看内容) 数据库连接问题 关于输入框的问题 用VB程序怎么把一个文件夹只共享给某个用户(当然要先删除everyone的所有权限去掉) 动态菜单问题 请问如何同步运行SHELLEXECUTE,就是SHELLEXECUTE调用的EXE运行完才运行其后面的代码? 从来没有遇见过这样怪的问题! 大神求指导!vb写的代码,运行出错48,加载dll文件有错误 如何显示单条数据 richtextbox中如何查找并替换掉所有"%ABC%"这样的字符串?
通常我们使用以下的代码进行记录循环:Do while not records.eof
combo1.additem records![Full Name]
records.movenext
loop 结果是每个循环中数据库都要进行一次数据结束测试。在大量的记录的情况下, 浪费的时间相当大。 而使用以下的代码, 可以提高近 1/3 的速度:records.movelast
intRecCount=records.RecordCount
records.movefirstfor intCounter=1 to intRecCount
combo1.additem records![Full Name]
records.movenext
next intCounter
返回
combo1.additem records![Full Name]
records.movenext
loop 结果是每个循环中数据库都要进行一次数据结束测试。在大量的记录的情况下, 浪费的时间相当大。 而使用以下的代码, 可以提高近 1/3 的速度:rst.movelast
while not rst.bof
list1.additem rst(0)
rst.moveprevious
wend
rst.close
while not rst.bof
list1.additem rst(0)
rst.moveprevious
wend
rst.close
while rs.bof<>true
list1.additem rs(0)
rs.moveprevious
wend
除了这样以外,游标类型以及锁还应该定义吧???
while not rs.bof
'访问当前记录集
rs.moveprevious
wend