高手们帮我看看 不明白 为什么 eof为真

wqllegend 2005-11-04 03:28:41
<%
sqbm=request.form("t1")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("data.mdb")
exec="select * from zhb where sqbm='"&sqbm&"'and sfly=false"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
rs.pagesize=1
pagecount=rs.pagecount
page=int(request.querystring("page"))
if page<=0 then page=1
if request.querystring("page")="" then page=1
rs.absolutepage=page
%>
.
.
.
<% if rs.eof then %>

<table width="898">
<td width="625" height="9" align="center"></td>
<td width="559" height="9" align="center">
</td>
<td width="1183" height="18" align="center" rowspan="2">
</td>
<td width="4602" height="9" align="center"><%=response.write("您所查询的部门信息不存在")%>
</td>
.
.
.

<%for b=1 to rs.pagesize
if rs.eof then
exit for
end if
%>
<tr>
<td width="15%" align="center" height="5"><font size="1"><%=rs("sqbm")%></font></td>
<td width="27%" align="center" height="5"><font size="1"><%=rs("wpmc")%></font></td>
<td width="11%" align="center" height="5"><font size="1"><%=rs("ggxh")%></font></td>
<td width="6%" align="center" height="5"><font size="1"><%=rs("dw")%></font></td>
<td width="7%" align="center" height="5"><font size="1"><%=rs("sl")%></font></td>
<td width="13%" align="center" height="5"><font size="1"><%=rs("qwdhrq")%></font></td>
<td width="10%" align="center" height="5"><font size="1"><%=rs("sfdh")%></font></td>
<td width="11%" align="center" height="5"><font size="1"><%=rs("ckjg")%></font></td>
</tr>
<%
rs.movenext
next
%>
</table>

<table border="0" width="99%">
<tr>
<td width="8%" height="9" align="center"></td>
<td width="16%" height="9" align="center">
</td>
<td width="21%" height="9" align="center">
<p align="right">注:Flase=否      True=是</td>
<td width="9%" height="9" align="center"></td>
<td width="7%" height="9" align="center">
</td>
</tr>
</table>

<table border="0" width="99%">
<tr>
<td width="8%" height="9" align="center"></td>
<td width="16%" height="9" align="center">
</td>
<td width="13%" height="9" align="center">
</td>
<td width="4%" height="9" align="center">
</td>
<td width="4%" height="9" align="center">
</td>
<td width="9%" height="9" align="center"><input TYPE="button" value="返回上一页" onCLICK="history.back(-1)"></td>
<td width="7%" height="9" align="center">
</td>
</tr>
</table>
.
.
<table border="0" width="99%" id="table1">
<tr>
<td width="8%" height="9" align="center"></td>
<td width="16%" height="9" align="center">
</td>
<td width="13%" height="9" align="center">
</td>
<td width="4%" height="9" align="center">
</td>
<td width="4%" height="9" align="center">
</td>
<td width="9%" height="9" align="center">
<%for i=2 to pagecount%>
<a href="find1_1.asp?page=<%=i%>"><%=i%></a>
<%next%>
</td>
<td width="7%" height="9" align="center">
</td>
</tr>
</table>

</body>

</html>


ADODB.Recordset 错误 '800a0bcd'

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

/find1_1.asp,行13

我告诉大家 第13行就是 "rs.absolutepage=page" 我感觉没什么问题呀 在我用鼠标点击第二页的时候
eof 不应该是真 为什么出现上面的提示呢? 郁闷中..........................
...全文
83 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
asp_m 2005-11-04
  • 打赏
  • 举报
回复
首先要确定第二页的参数也传递过去了
比如
<a href="yourpage.asp?pages=2">第二页</a>
这样才能根据传递的参数
pages=request.querystring("pages")来进行第二页的提取
monkeyhjl 2005-11-04
  • 打赏
  • 举报
回复
当然是用带参数的方式传呀。
wqllegend 2005-11-04
  • 打赏
  • 举报
回复
第一页是得到值了 怎样再传送到第二页。。。第page页呢
monkeyhjl 2005-11-04
  • 打赏
  • 举报
回复
当你点第二页的时候t1这个参数传过去了么?
sqbm=request.form("t1")
点第二页的时候这里没有取到值。

28,406

社区成员

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

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