问题还是没有解决,还是同样错误:
我的源代码如下:
<!--#include file="ChkPwd.asp"-->
<html>
<head>
<title>用户管理</title>
</head>
<body>
<%
UserId=Request("UserId")
OriPwd=Request.Form("OriPwd")
Pwd=Request.Form("Pwd")
'判断是否存在此用户
'===============连接数据库===============
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="driver={SQL Server};server=Ntserver;UID=sa;PWD=sa;Database=UserMan"
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("UserMan.mdb")
'设置SQL语句,判断是否存在此用户
sql="SELECT * FROM Users WHERE UserId="& UserId &"And UserPwd='"& OriPwd &"'"
set rs=Conn.Execute(sql)
If rs.Eof Then
Response.Write"不存在此用户名或密码错误!"
%>
<Script Language="JavaScript">
setTimeout("history-go(-1)",1600);
</script>
<%
Else
Conn.Execute("UPDATE Users SET UserPwd=""&Trim(Pwd)&""WHERE UserId="&UserId)
response.write"<h2>更改密码成功!</h2>"
%>
<Script Language="JavaScript">
setTimeout("window.close()",1600);
</Script>
<%
End If
%>
</body>
</html>