ADODB.Recordset 错误 '800a0e78'
对象关闭时,不允许操作。
/mima/mmxiugai.asp,行 35
源代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>密码输入错误</title>
<style type="text/css">
<!--
.style1 {
font-family: "宋体";
font-size: 10pt;
}
body {
background-image: url(../img/beijing.gif);
margin-top: 0px;
}
-->
</style>
</head>
<body>
<%
dim conn,db,rs,sql,oldpasswd,newpasswd,username
db="/mdb/login.mdb"
username=Session("user")
oldpasswd=trim(request("textfield"))
newpasswd=trim(request("textfield2"))
if username="" then
response.redirect("/sorry.asp")
else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
sql="select * from name where login='"&username&"' and passwd='"&oldpasswd&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
if not rs.eof then
rs.open sql,conn,1,2
rs("passwd")=newpasswds
rs.update
rs.close
conn.close
set conn=nothing
response.Redirect("mmok.asp")
else
%>
<span class="style1">对不起,您输入的原密码不对,请<a href="mima.asp">返回</a>重新输入!</span>
<%
end if
end if
%>
</body>
</html>
35行为红字那一行,我的数据库这样关闭不对么??
望指教,谢谢!!!!
[此贴子已经被作者于2005-11-29 11:17:12编辑过]