急!!帮忙修改代码!!BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除。。。
<%dimid,rs,sql,title,classid,Nclassid,rs2,classname,Nclassname,rs3,id1,id2id=saferequ...
<%
dim id,rs,sql,title,classid,Nclassid,rs2,classname,Nclassname,rs3,id1,id2
id=saferequest("id",1)
id1=id-1
id2=id+1
set rs=server.createobject("adodb.recordset")
rs.open "update article set hits=hits+1 where articleID="&id,conn,1,3
sql="select * from article where articleid="&id
rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
classid=rs("classid")
Nclassid=rs("Nclassid")
set rs22=server.createobject("adodb.recordset")
rs22.open "select title from article where articleID="&id1,conn,1,1
nextname=rs22("title")
rs22.close
set rs23=server.createobject("adodb.recordset")
rs23.open "select title from article where articleID="&id2,conn,1,1
nextname2=rs23("title")
rs23.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select class from artclass where id="&rs("classid"),conn,1,1
classname=rs2("class")
rs2.close
set rs3=server.createobject("adodb.recordset")
rs3.open "select class from artclass where id="&rs("Nclassid"),conn,1,1
Nclassname=rs3("class")
rs3.close
end if
%>
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录
这段代码报错,请问这是怎么回事啊,请大家帮忙修改,把要修改的代码贴在回复里面,谢谢! 展开
dim id,rs,sql,title,classid,Nclassid,rs2,classname,Nclassname,rs3,id1,id2
id=saferequest("id",1)
id1=id-1
id2=id+1
set rs=server.createobject("adodb.recordset")
rs.open "update article set hits=hits+1 where articleID="&id,conn,1,3
sql="select * from article where articleid="&id
rs.open sql,conn,1,1
if not rs.eof then
title=rs("title")
classid=rs("classid")
Nclassid=rs("Nclassid")
set rs22=server.createobject("adodb.recordset")
rs22.open "select title from article where articleID="&id1,conn,1,1
nextname=rs22("title")
rs22.close
set rs23=server.createobject("adodb.recordset")
rs23.open "select title from article where articleID="&id2,conn,1,1
nextname2=rs23("title")
rs23.close
set rs2=server.createobject("adodb.recordset")
rs2.open "select class from artclass where id="&rs("classid"),conn,1,1
classname=rs2("class")
rs2.close
set rs3=server.createobject("adodb.recordset")
rs3.open "select class from artclass where id="&rs("Nclassid"),conn,1,1
Nclassname=rs3("class")
rs3.close
end if
%>
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录
这段代码报错,请问这是怎么回事啊,请大家帮忙修改,把要修改的代码贴在回复里面,谢谢! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询