rs.bof和rs.eof
if rs.bof then
表示:当前指针的位置是在第一行记录之前,则...
if rs.eof then
表示:当前指针的位置是在最后一行记录之后,则...
if not rs.eof then
if not rs.eof then
表示:当前指针的位置没有到达最后一条记录
if not rs.bof then
表示:当前指针的位置没有到达第一条记录
-------------------------
###推荐使用下面两条
if not (rs.bof and rs.eof) then
表示:指针位于 RecordSet 的当中(并非是最后一条和第一条) ,说明一定有记录。
if rs.bof and rs.eof then
表示:没有任何记录
本文介绍了如何使用rs.bof和rs.eof来判断RecordSet中记录指针的位置。rs.bof用于判断指针是否位于第一条记录之前,rs.eof则判断是否位于最后一条记录之后。通过组合使用这两个条件,可以有效判断数据集的状态。
170

被折叠的 条评论
为什么被折叠?



