错哪了,搞不懂

KinGboY16 2006-11-09 09:35:55
查询 userinfo 与 reply 两个表中的所有记录

userinfo表 (username password usersex useremail usersign userlevel visitcount
topiccount regdate)

reply表 (topicid content username replytime )


<%
topicid=request.querystring("topicid")

replysql="select * from reply,userinfo where reply.username=userinfo.username and reply.topicid='" & topicid & "' order by reply.replytime desc"

set replyrs=conn.execute(replysql)

while not replyrs.eof %>

<tr class="td"><td width="207" height="25">
<table width="100%"><tr><td>
用户:<%=replyrs("username")%><br>

访问:<%=replyrs("visitcount")%><br>
文章:<%=replyrs("topiccount")%><br>
注册:<%=replyrs("regdate")%><br>
E-Mail:<%=replyrs("useremail")%></td></tr></table>
</td>
<td width="547" height="25">
<table width="100%"><tr><td> </td></tr>
<tr><td><%=replyrs("content")%></td></tr>
<tr><td><table width="95%"><tr><td>----------------------------------------------------------------------------------------------------------<br>
签名:<%=replyrs("usersign")%></td></tr></table>
</td></tr></table></td></tr>

<%
replyrs.movenext
wend%>




IE提示错误

错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。


(只给出部分代码!)
...全文
180 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
vitor_lt 2006-11-10
  • 打赏
  • 举报
回复
。。。。。。。。。书里?

又一个照书打的。没自己的思想。
KinGboY16 2006-11-10
  • 打赏
  • 举报
回复
现在解决了,书里出错了,总算找出来了,谢谢各位的关心!!!!!!!!1
zhwh1981 2006-11-10
  • 打赏
  • 举报
回复
加上if not (replyrs.eof and replyrs.bof ) then应该可以,不过建议最好是在数据库中做一个视图,这样操作更方便,出错也比较少
li_net 2006-11-10
  • 打赏
  • 举报
回复
reply.topicid='" & topicid & "' //看看这里,如果topicid=request.querystring("topicid")有值
================
不会啊, 加了判断了

while not replyrs.eof
====================
最好在前面加if not (replyrs.eof and replyrs.bof ) then
stou 2006-11-10
  • 打赏
  • 举报
回复
错在哪句
beda_forever 2006-11-09
  • 打赏
  • 举报
回复
topicid=request.querystring("topicid")
这里有得到值吗?
KinGboY16 2006-11-09
  • 打赏
  • 举报
回复
不会啊, 加了判断了

while not replyrs.eof
ljmljz 2006-11-09
  • 打赏
  • 举报
回复
用response.write replysql 显示一下你的查询条件,再看看
maifine 2006-11-09
  • 打赏
  • 举报
回复
你检索的记录为空,你检查下你的数据库里的数据的正确性哦

28,391

社区成员

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

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