ASP中更新文本域字段 怎么更新
conn.execute("updatesjxxsetdtqk="&dtqk&",mtqk="&mtqk&",gjjy="&gjjy&",tianq="&tianq&",...
conn.execute("update sjxx set dtqk="&dtqk&",mtqk="&mtqk&",gjjy="&gjjy&",tianq="&tianq&",renq="&renq&",zhurenq="&gjjy&",xibuq="&xibuq&" where paperno="&request("paperno"))
错在哪里 ? 展开
错在哪里 ? 展开
1个回答
展开全部
<%
Dim action
action=Trim(Request("action"))
if action="chkAdmin" then
ReNewPwd=Request.form("ReNewPwd")
pid=Request.form("OldPwd")
sql="select * From users where nid='"&nid&"'"
set rs=server.CreateObject ("Adodb.recordset")
rs.open sql,conn,1,3
If Not rs.Eof then
if rs("pid")<>pid then
Response.Write "<script>alert('旧密码输入错误!');this.location.href='changepws.asp';</SCRIPT>"
Response.End
end if
rs("pid")=ReNewPwd
rs.update
rs.close
Set rs = Nothing
Response.Write "<script>alert('密码修改成功!');this.location.href='./';</SCRIPT>"
Response.End
end if
end if
%>
这是一个修改密码的程序,自己改改也可以用的.
修改密码和更新内容原理一样的
Dim action
action=Trim(Request("action"))
if action="chkAdmin" then
ReNewPwd=Request.form("ReNewPwd")
pid=Request.form("OldPwd")
sql="select * From users where nid='"&nid&"'"
set rs=server.CreateObject ("Adodb.recordset")
rs.open sql,conn,1,3
If Not rs.Eof then
if rs("pid")<>pid then
Response.Write "<script>alert('旧密码输入错误!');this.location.href='changepws.asp';</SCRIPT>"
Response.End
end if
rs("pid")=ReNewPwd
rs.update
rs.close
Set rs = Nothing
Response.Write "<script>alert('密码修改成功!');this.location.href='./';</SCRIPT>"
Response.End
end if
end if
%>
这是一个修改密码的程序,自己改改也可以用的.
修改密码和更新内容原理一样的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询