有关于ADO中的IF RST.BOF IF RST.EOF的应用的查询的问题! 先查看RST中是否有記錄,如無記錄那就會報錯. if rst.recordcount=0 then 無記錄msgbox("出錯"). 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 感谢你的好意: 我是在用下一条或上一条时防错的! if rs.recordcount>1 then if not rs.eof then rs.movenext endif endif但是还会出现错误! 使用如下代码试一试:dim I as longfor I=0 to rs.recordcount-1 rs.movenextnext I 哦,我知道了.采用變量 首記錄時 flageof=1if flageof=rs.recordcount then "已是最后一條記錄" else rs.movenext flageof=flageof+1end if recordcount 不一定有用!判断数据库为空的方法:if rst.bof =true and rst.eof =true For Each...Next 的用法 本来用C#的,可电脑太烂,想用VB学会了,再考虑换电脑,问下VB做网页可以吗? 帮忙啊 利用winsock发送邮件,如何处理图片附件呢? 如何判断一个子窗体在MDI窗体中已经打开. 急!急!!!关于远程获取桌面的程序设计 在VB程序中如何实现这样的问题 如何处理 关于vb调用DLL的问题,高手们帮忙!!! 如何在True DBGrid中判断当前鼠标点击的某个字段值的列号和行号? 向各位大狭请教 如保知道打印机可用了?
我是在用下一条或上一条时防错的!
if rs.recordcount>1 then
if not rs.eof then
rs.movenext
endif
endif
但是还会出现错误!
dim I as long
for I=0 to rs.recordcount-1
rs.movenext
next I
采用變量
首記錄時 flageof=1
if flageof=rs.recordcount then
"已是最后一條記錄"
else
rs.movenext
flageof=flageof+1
end if
判断数据库为空的方法:
if rst.bof =true and rst.eof =true