rs.open sql,conn,1,3什么意思,出错!!
<!--#include file=conn.asp-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>判断是否在线</title>
</head>
<body>
<%
name=request.Form("name")
room=request.Form("room")
set rs=server.CreateObject("adodb.recordset")
sql="select from online where room='"&room&"'"
rs.open sql,conn,1,2
if rs.recordcount>0 then
for i=1 to rs.recordcount
'name=rs("name")
if name=rs("name") then
errormessage="<center><font color=blue>对不起,在</font><font color=red>"&fangjian&"</font><font color=blue>房间中,该用户已经存在。</font></center><br>"
error=1
exit for
end if
rs.movenext
next
end if
if errormessage<>"" then
response.Write("<br><br>"&errormessage&"<br>")
response.Write("<center><a herf='javascript:history.go(-1);'>请重新输入</a></center>")
rs.close
else
mip=request.ServerVariables("remote_host")
denglutime=cstr(time)
rs.addnew
rs("ip")=mip ' ip地址
rs("name")=name ' 用户名
rs("time")=denglutime '登录时间
rs("room")=room '房间名
rs.update
session.Timeout=20
session("name")=name
session("room")=room
application.Lock
application(room)=application(room)&"<center><font color=blue>大家欢迎</font><b><font color=red>"&room&"</font></b><font color=blue>来到聊天室</font></center><br>"
application.UnLock()
rs.close
sql="select num from room where room_name='"&room&"'"
rs.open sql,conn,1,3
rs("num")=rs("num")+1
rs.update
rs.close
response.Redirect("main.asp")
end if
%>
</body>
</html>
rs.open sql,conn,1,3运行出错!!