rs.open sql,conn,1,3什么意思,出错!!

mahongzuoye 2009-06-07 10:22:09
<!--#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运行出错!!
...全文
157 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lihan6415151528 2009-06-07
  • 打赏
  • 举报
回复
rs.open sql,conn,1,3

代表有修改权限

rs.open sql,conn,1,1

代表只有查看(select)权限
mahongzuoye 2009-06-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 frankrenping 的回复:]
改成rs.open sql,conn,1,1 或rs.open sql,conn,2,3试试
[/Quote]
改完了,可是还是有错:

Microsoft JET Database Engine 错误 '80040e14'

SELECT 子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。

/lx/lts/login.asp,行 15
frankrenping 2009-06-07
  • 打赏
  • 举报
回复
改成rs.open sql,conn,1,1 或rs.open sql,conn,2,3试试

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧