注册 登录
编程论坛 ASP技术论坛

[求助]BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除

lishizhong_899 发布于 2008-11-29 11:58, 1234 次点击
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/bbs/list.asp, 第 39 行


<!--#include file="config.asp" -->
<!--#include file="cn.asp" -->
<%
if request.form("ok")<>""then
userid=request.cookies("userid")
if userid=""then
response.redirect"login.asp?m=4"
%>
<script language="vbscript">
alert("您还没有登录!")
location.href="login.asp"
</script>
<%
response.end
end if
title=do_yinhao(request.form("title"))
pic=do_yinhao(request.form("pic"))
content=do_yinhao(request.form("content"))
dt=now()
visit_num=0
reply_num=0
ip=request.servervariables("remote_addr")
os_ie=request.servervariables("http_user_agent")
os=system(os_ie)
ie=browser(os_ie)
small_id=request.form("small_id")
sql="insert into info(title,pic,content,userid,dt,visit_num,reply_num,ip,os,ie,small_id)values('"&title&"','"&pic&"','"&content&"','"&userid&"','"&dt&"','"&visit_num&"','"&reply_num&"','"&ip&"','"&os&"','"&ie&"','"&small_id&"')"
cn.execute(sql)
cn.execute("update users set mark=mark+100 where userid='"&request.cookies("userid")&"'")
%>
<script language="vbscript">
alert("发布成功!")
location.href="list.asp?small_id=<%= small_id %>"
</script>
<%
end if
small_id=request.querystring("small_id")
set rs=cn.execute("select * from small where small_id='"&small_id&"'")
small_name=rs("small_name")
big_id=rs("big_id")
rs.close:set rs=nothing
set rs=cn.execute("select * from big where big_id='"&big_id&"'")
big_name=rs("big_name")
rs.close:set rs=nothing
%>
8 回复
#2
yms1232008-11-29 14:57
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录
这个错误肯定处在数据库查询上,查询不到内容就出这个错误,楼主检查一下数据库的查询代码。
#3
lili06102008-11-29 15:18
说明有数据库条件符合你查询的数据没有
#4
zhuiis2008-11-29 15:43
这个错误是你所绑定的数据库字段没有包含在IF语句里页。当你的数据存在,它显示是正常的,如果你的数据改动了或删除了,哪么它就会出现这样的错误了。
#5
心海潮汐2008-11-29 17:53
说明有数据库条件符合你查询的数据没有,你可以加一个是否存在记录的判断后,在执行39行以下的。
#6
lishizhong_8992008-11-30 12:40
回复 第5楼 心海潮汐 的帖子
可是我不知道怎么改,在哪里改,谢谢
#7
心海潮汐2008-12-01 12:52
If Rs.eof then
response.write "<script language=javascript>alert('没有该会员信息!');history.go(-1);</script>"
response.end
end if
放在39前面。
#8
lishizhong_8992008-12-02 09:22
回复 第7楼 心海潮汐 的帖子
还是不行啊,我都急死啦
#9
心海潮汐2008-12-02 12:50
1