asp网页报错显示“BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录
代码如下:<!--#includefile="Conn.asp"--><%dimroomnamedimuseriduserid=Request("userid")room...
代码如下:
<!--#include file="Conn.asp"-->
<% dim roomname
dim userid
userid=Request("userid")
roomname=Request("roomname")
Session("roomname") = roomname
set Rs=server.CreateObject ("ADODB.recordset")
sql="select * from UserOnline where userid='" & Session("name")& "'"
Rs.open sql,conn,1,3
if rs.eof and rs.bof then
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Redirect "Main.asp"
else
Rs.AddNew
Rs("roomname")=roomname
Rs("userid")= Session("name")
Rs("nickname")= Session("nickname")
Rs("logintime")= now()
Rs.UpDate
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Redirect "Main.asp"
end if
%> 展开
<!--#include file="Conn.asp"-->
<% dim roomname
dim userid
userid=Request("userid")
roomname=Request("roomname")
Session("roomname") = roomname
set Rs=server.CreateObject ("ADODB.recordset")
sql="select * from UserOnline where userid='" & Session("name")& "'"
Rs.open sql,conn,1,3
if rs.eof and rs.bof then
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Redirect "Main.asp"
else
Rs.AddNew
Rs("roomname")=roomname
Rs("userid")= Session("name")
Rs("nickname")= Session("nickname")
Rs("logintime")= now()
Rs.UpDate
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Redirect "Main.asp"
end if
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询