注册 登录
编程论坛 ASP技术论坛

帮忙看下哪里错了

Nameker 发布于 2012-07-17 02:19, 445 次点击
<!-- #include file="Conn.asp" -->
<%
Account=Request("Account")
Password=Request("Password")
if Account= "" or Password= "" then
Response.write "Close"
Response.end
End If

Set rs=Server.CreateObject("ADODB.Recordset")
Mysql="select * from info where Account="&Account
Rs.Open Mysql,Conn,3,2
if not rs.eof then
Response.write "Close"
Response.end
End If

Set Rs=Server.Createobject("Adodb.Recordset")
Mysql="Select * From info"
Rs.Open Mysql,Conn,3,2
Rs.Addnew
Rs("Account")=Request("Account")
Rs("Password")=Request("Password")
Rs.Update
Rs.Close
Set Rs=Nothing
Response.write "Complete"
Response.end
%>
2 回复
#2
yms1232012-07-17 10:17
什么数据库,出现什么错误提示?表名最好加中括号来区分
比如:select * from [user]
#3
netlin2012-07-18 14:09
楼主,在你的代码上可能出问题的地方做了修改,你试试。

<!-- #include file="Conn.asp" -->
<%
Account=Request("Account")
Password=Request("Password")
if Account= "" or Password= "" then
Response.write "Close"
Response.end
End If

Set rs=Server.CreateObject("ADODB.Recordset")
Mysql="select * from info where Account="&Account    '数据表中Account字段类型是数字型才能这样写
Rs.Open Mysql,Conn,3,2
if not rs.eof then
Response.write "Close"
Response.end
End If
Rs.Close

Set Rs=Server.Createobject("Adodb.Recordset")
Mysql="Select * From info"
Rs.Open Mysql,Conn,3,2
Rs.Addnew
Rs("Account")=Request("Account")
Rs("Password")=Request("Password")
Rs.Update
Rs.Close
Set Rs=Nothing
Response.write "Complete"
Response.end
%>

1