请教——用户管理及登录问题
源代码UserEdit.asp如下:<%
dim Uid
Uid=Request.QueryString("UserId")
sql="SELECT * FROM Users WHERE UserId="&Uid
'Server对象的CreateObject方法建立Connection对象
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")
'定义Recordset对象
Set rs=Server.CreateObject("ADODB.Recordset")
Set rs=Conn.Execute(sql)
If rs.Eof then
Response.Write "<h2>不存在此用户!</h2>"
Else
%>
<form method="POST" action="UserSave.asp" name="myform">
<p align="center">用户基础信息</p><input type="hidden" name="isadd" value="edit">
<input type="hidden" name="UserId" value="<%=Uid%>">
<table align="center" border="1" cellpadding="1" cellspacing="1" width="480" bordercolor="#008000" bordercolordark="#FFFFF">
<tr>
<td align=left bgcolor="#E1F5FF" width="157">用户名</td>
<td width="307"><%=rs(UserName)%></td>
</tr>
<tr>
<td align=left bgcolor="#E1F5FF" width="157">用户姓名</td>
<td width="307"><input type="text" name="Ename" size="20" value="<%=rs(Ename)%>"></td>
</tr>
<tr>
<td align=left bgcolor="#E1F5FF" width="57">电子邮箱</td>
<td width="307"><input type="text" name="Ename" size="40" value="<%=rs("Email")%>"></td>
</tr>
</table>
<p align="center"><input type="submit" value="提 交" name="B2"></p>
<%end if%>
</form>
</body>
执行之后,出现如下错误提示:
Microsoft JET Database Engine (0x80040E14)
/UserEdit.asp, 第 12 行
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
第十二行应该是“Set rs=Conn.Execute(sql)”,我确实找不到错误,请高手指教