ASP中if rs.bof and rs.eof解析
- http://blog.gufang.org/
- 2021/9/7 3:26:38
- 来源:Gufang's Private Space
- 点击:
if rs.eof and rs.bof then
rs.EOF 表示到达数据库表中的最后一行,
rs.BOF 表示到达数据库表中的第一行。
整个语句可以理解为,如果当前数据库中的最后一行就是数据库表中第一行,当前数据库表中没有任何数据,然后执行条件
----------------------------------------
if rs.eof and rs.bof then 当记录第一条和最后一条都不存在。则执行该句 end if
if rs.bof then
表示:当前指针的位置是在第一行记录之前,则...
if 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
表示:没有任何记录
发表评论(0)