篮球暴扣:VB中如何每读取数据库中的一条记录调用一次过程

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 16:24:53
VB中如何 每 读取数据库中的一条记录调用一次过程

public sub getRecord()
while not rs.eof
call test'每读取一个记录,调用 test 过程
rs.movenext
wend
end sub

public sub test()
msgobx "haha~~~"
end sub

'当然,前面还是要定义的,因为时间关系我就不写了!呵呵

把你调用的过程中的代码写入一个自定义的函数
这样就可以在读取数据库中的一条记录后写上一行调用这个函数的代码了