哪个问题,我也遇到过,你如果使用ADO的话,那么你可以使用ADO的移动,那么就不会出现这个问题。如果,你用ADODB的话,那么移动的话,只要用EOF 和BOF同时判断就不应该出现这个问题了。哈哈哈,我就知道这么多了。能帮上你吗???
解决方案 »
- 怎样让放入ROT对象中的对象进程结束后,还可以共其他进程用
- 我用的是DATA控件连接的数据库可总是不能添加记录
- 急求指教:如何将VB与VC结合使用?
- flashget那个小方框怎么做?
- 请问,怎么用API检测端口有没有打开?
- 还有别的好的计算机论坛吗?特别是职业软件从业人员愿意访问的?
- 如何在VB中访问局域网网上邻居共享的目录?
- 如何吧ADO返回的记录集,与MSFLEXGRID控件帮定起来?(急!急!急!)
- VB中感叹号“!”与圆点“.”的用法差异
- 请问哪里有关于用VB调用WINDOWS NT API的资料???????
- 在vb里如何读写文本文件
- 想获得动态数组有多少个元素,为什么不能用UBound()?
dim rst as adodb.recordset
set rst = new adodb.recordset
rst.open "select * from table",conn,,,adcmdtext
set Label1.DataSource = rst
label1.datafield = "field"
...
...
...
Private Sub Command1_Click()
if not rst.eof then
rst.movenext
else
rst.MoveLast
msgbox "到记录末尾了"
end if
End SubPrivate Sub Command2_Click()
if not rst.eof then
rst.MovePrevious
else
rst.MoveFirst
msgbox "到记录末尾了"
end if
End Sub
Private Sub Command2_Click()
if not rst.Bof then
rst.MovePrevious
else
rst.MoveFirst
msgbox "到记录开头了"
end if
End Sub
BOFAction改为movefirst
if rst.absolutecount = rst.recordcount then
msgbox "end of rst"
endif
if not rst.eof then
rst.movenext
else
rst.MoveLast
msgbox "到记录末尾了"
end if
End Sub
你试下
rs.open "select...",con,3
或
rs.open "select...",con,adopenstatic