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

来源:百度知道 编辑:UC知道 时间:2024/05/30 01:50:50
论坛删除帖子的时候出现错误 请各位兄弟帮下忙 感激不尽
65行到92行
else
conn.execute("update [user] set deltopic=deltopic+1 where username='"&username&"'")
conn.execute("update [forum] set toptopic=0,deltopic=1,lastname='"&Request.Cookies("username")&"',lasttime='"&now()&"' where id="&id&" and deltopic=0")
sql="select * from bbsconfig where id="&forumid&""
rs.Open sql,Conn,1
if not rs.eof then
lastpic=""&rs("lasttopic")&""
else
lastpic="no"
end if
rs.close
if instr(lastpic,"?id="&id&"")>0 then
sql="select * from forum where deltopic<>1 and forumid="&forumid&" order by id Desc"
rs.Open sql,Conn,1
lastid=rs("id") 提示该处出现错误
lasttopic=""&rs("topic")&""
lastname=""&rs("lastname

65行到92行
else
conn.execute("update [user] set deltopic=deltopic+1 where username='"&username&"'")
conn.execute("update [forum] set toptopic=0,deltopic=1,lastname='"&Request.Cookies("username")&"',lasttime='"&now()&"' where id="&id&" and deltopic=0")
sql="select * from bbsconfig where id="&forumid&""
rs.Open sql,Conn,1
if not rs.eof then 这行替换下面这个保证你没有问题
lastpic=""&rs("lasttopic")&""

if rs.bof and rs.eof then 替换上面这个