形容自己命苦的说说:update 语法错误 100分

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 19:15:02
<%
sub edit()
oldpsw=trim(request("oldpsw"))
if oldpsw="" then
Errmsg=Errmsg+"<li>请输入您的旧密码,才能完成修改。"
founderr=true
elseif md5(oldpsw)<>rs(1) then
errmsg=errmsg+"<li>输入的旧密码错误,请重新输入"
founderr=true
end if
if trim(request("question"))="" then
errmsg=errmsg+"<li>请输入密码提示问题。"
founderr=true
else
if trim(request("question"))=rs(2) then
question=rs(2)
else
question=trim(request("question"))
end if
end if
if trim(request("answer"))="" then
errmsg=errmsg+"<li>请输入密码提示问题答案。"
founderr=true
else
if trim(request("answer"))=rs(3) then
answer=rs(3)
else
answer=md5(trim(request("answer")))
end if
end if
if founderr then exit sub

if trim(request("psw"))<>"" then
psw=md5(trim(request("psw")))
else
psw=md5(trim(request("oldpsw")))
end if

conn.execute("update [user] set password='"& psw &"',question='"& question &"',answer='"& answer &"'")
response.Write("<li>操作成功,您的修改信息已成功提交!")
rs.close()
set rs=nothing
end sub

Microsoft JET Database Engine 错误 '80040e14'

UPDATE 语句的语法错误。

/site/feilong/ModifyPSW.asp,行 123
conn.execute("update [user] set password='"& psw &"',question='"& question &"',answer='"& answer &"'")
不是空格的问题

在该页面中conn 定义了没?
还有如果还不行改为
conn.execute "update user set password='"& psw &"',question='"& question &"',answer='"& answer &"'" 试一下