提示有语法错误,可我怎么看都没错!!
if founderr=false or request.Form("check")<>"" then
set rs=server.createobject("adodb.recordset")
sql="select * from user where u_name="&u_name
response.Write sql
response.End()
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
founderr=true
errmsg=errmsg & "<br><li>“" & u_Name & "”已经存在!请换一个用户名再试试!</li>"
else
rs addnew
rs("u_name")=u_name
rs("u_password")=md5(u_password)
rs("u_email")=u_email
rs("u_question")=u_question
rs("u_reply")=u_reply
rs("u_date")=formatdatetime(now(),2)
if u_occupation<>"" then
rs("u_occupation")=u_occupation
end if
if u_favor<>"" then
rs("u_favor")=u_favor
end if
rs.update
rs.close
set rs=nothing
end if
end if
主要内容就在这段,提示:
Microsoft OLE DB Provider for SQL Server 错误 '80040e14'
在关键字 'user' 附近有语法错误。
/user/user_reg2.asp,行 63
(也就是‘rs.open sql,conn,1,3’这一行,说明上一行的sql句子有问题,可我没看出有错,我用的是sql sever数据库,连接、权限都没问题)