这两种判断没有记录的办法哪种是正确的呀?见代码!!!
一。
if rs.bof=true and rs.eof=true then
msgbox "没记录"
endif
二。
if rs.recordcount<=0 then
msgbox "没记录"
endif
我好象听说第一种用法会有问题,可是很多代码都是这么写的。
想听老师说说。
一。
if rs.bof=true and rs.eof=true then
msgbox "没记录"
endif
二。
if rs.recordcount<=0 then
msgbox "没记录"
endif
我好象听说第一种用法会有问题,可是很多代码都是这么写的。
想听老师说说。
如果用服务端游标打开的话,recordcount始终为-1
if rs.bof and rs.eof then
...
endif
第二种方法如果CursorLocation设置成客户端游标也没有问题
否则recordcount是不准确的。不知是何意思?再请教。
Msgbox "没有记录!"
end if