asp数据库代码报form子语句语法错误
<% userName=trim(request("userName"))
passWord=request("passWord")
if userName<>"" and passWord<>"" then
sql="select * from user where [userName]='"&userName&"'"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn,1,3
if rs.bof or rs.eof then
response.Write("<script language='javascript'>alert('该用户不存在!');</script>")
'elseif cint(rs("purview"))=3 then
'response.Write("<script language='javascript'>alert('该用户不存在!');)
elseif userName=rs("userName") and passWord=rs("passWord") then
response.Write("<br><br><div align='center'class='t-title' style='color:#000000'>欢迎用户 <font color='#FFFFFF' face='Verdana, Arial, Helvetica, sans-serif'><strong>"&Ucase(rs("userName"))&"</strong></font> 登陆后台管理</div>")
session("user")=rs("userName")
session("flag")=rs("purview")
response.Write("<script language='javascript'>alert('您已经成功登陆,请先阅读系统说明!');parent.location='admin_main.asp?login=true';</script>")
else
userName=rs("userName")
response.Write("<script language='javascript'>alert('密码错误!');</script>")
end if
rs.close
set rs=nothing
end if
%>
帮忙看看 运行的时候报这段这个行错误rs.Open sql,conn,1,3
追问:不行,改了后运行显示'
Microsoft JET Database Engine 错误 '80040e14'
FROM 子句语法错误。
/7/admin_login/index.asp,行 37