BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的

yct168 2007-03-16 12:12:59
这段代码也会出现此种错误,请看看是什么原因.
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="526">
<%set urs =conn.execute("select * from [User] where userid='"&membername&"'")%>
<tr>
<td align="center" height="26"><br>  <p align="center"><%
if rs.eof and rs.bof then
response.write "<p align='center'> 对不起,没有相关订单资料</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if

end if
if currentPage=1 then
showpage totalput,MaxPerPage,"djgl1.asp"
showContent
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
bookmark=rs.bookmark ----出错的地方
showpage totalput,MaxPerPage,"djgl1.asp"
showContent
else
currentPage=1
showpage totalput,MaxPerPage,"djgl1.asp"
showContent
end if
end if
rs.close
end if

set rs=nothing
sub showContent
dim i
i=0
uyss=0
unss=0
%></td>
</tr>
</table>
<p style="margin-top: 0; margin-bottom: 0"> </p>
</center>
</div> </td>
</tr>
<%set urs=nothing%>
<tr>
<td align="right" height="26"> </td>
</tr>
<tr>
<td>
<p align="center"><%
end sub

function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<form method=Post action="&filename&">"
response.write "<p align='center'><font color='#000000'>分页</font> "
if CurrentPage<2 then
response.write "<font color='#000000'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1&>首页</a> "
response.write "<a href="&filename&"?page="¤tPage-1&">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000000'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)
response.write ">下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000000'> 页次:</font><strong><font color=black>"¤tPage&"</font><font color='#000000'>/"&n&"</strong>页</font> "
response.write "<font color='#000000'> 共<b>"&totalnumber&"</b>条信息 <b>"&maxperpage&"</b>条信息/页</font> "
end function
%></td>
</tr>
</table>
</center>

</body>
</html>
...全文
300 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
cpp2017 2007-03-16
  • 打赏
  • 举报
回复
if rs.eof and rs.bof then ===> if rs.eof or rs.bof then
raybvb09 2007-03-16
  • 打赏
  • 举报
回复
if rs.eof and rs.bof then

and 换成 or
yct168 2007-03-16
  • 打赏
  • 举报
回复
有哪位知道原因吗?
yct168 2007-03-16
  • 打赏
  • 举报
回复
我下一页还有记录啊.
cow8063 2007-03-16
  • 打赏
  • 举报
回复
没有记录了,而你要操作记录
加个判断if not rs.eof
yct168 2007-03-16
  • 打赏
  • 举报
回复
bookmark
是定义的一个变量.

如果换为
AbsolutePage

选择下一页不会出现错误,但与第一页的内容一样,没有变化???
BoyHaXin 2007-03-16
  • 打赏
  • 举报
回复
rs.AbsolutePage这才是翻页的吧
yct168 2007-03-16
  • 打赏
  • 举报
回复
if rs.eof and rs.bof then

and 换成 or
也会出现错误

数据库中有记录.

不知是什么原因了!~~
chenfan101 2007-03-16
  • 打赏
  • 举报
回复
我也遇到过相关的问题.我是分页只要点最后一页也会这个错误.其他页都正常。用视图的。
melodywithme 2007-03-16
  • 打赏
  • 举报
回复
数据库中没有记录
yct168 2007-03-16
  • 打赏
  • 举报
回复
bookmark=rs.bookmark ----出错的地方

单击下一页后还是出现
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的
这个错误信息。
不知是什么原因???

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧