ADODB.Recordset 错误 '800a0bb9'
下面是:AdminLogin.asp的代码.
<html>
<head>
<title>登陆</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/style1.css" type="text/css">
</head>
<!--#include file="inc/header.inc"-->
<BODY marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
<div align="center"> <br> <B><FONT COLOR="#FF0033" SIZE="3"><br> 管理员登录</FONT></B><br> <br> </div>
<table width="44%" border="1" cellspacing="1" cellpadding="1" align="center" bordercolordark="#FFFFFF" bordercolorlight="#000000">
<tr valign="top" align="center"> <td height="127"><br>
<form action="adminpass.asp" method="post">
<p> 用户名: <input type=text size=15 name="user"> <br>
<p> 密 码 : <input type=password size=15 name="pass">
<br> <p> <input type=submit value="管理登陆">
<input type=reset value="重 置" name="重设">
</form></td></tr> </table><br> <br>
<table width="44%" border="0" cellspacing="2" cellpadding="2" align="CENTER">
<tr>
<td>
<div align="CENTER">[ <a href="login.asp">会员登陆</a> ] [ <a href="getpass.asp">忘记密码</a>
] [ <a href="xiu.asp">查看/修改信息</a> ]</div>
</td>
</tr>
</table>
<p>
</body>
</html>
<!--#include file="inc/footer.inc"-->
下面是AdminPass.asp的代码:
<!--include file="Conn.asp"-->
<%'Response.buffer=True%>
<html>
<head>
<base href="http://localhost/瀹㈡埛绠$悊绯荤粺/AdminPass.asp">
<title>管理登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel ="stylesheet" href ="inc/style1.css" type ="text/css">
</head>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
<%
dim rs
dim username
dim password
username=request("user")
password=Request("pass")
set rs=server.createobject("adodb.recordset")
rs.open "select * from admin where ad_user='"&username&"' and pass='"&password&"'",conn,1,1
if not(rs.bof and rs.eof) then
if username=rs("ad_user") and password=rs("pass") then session("user")=username
session("qx")= 1
Response.Redirect("adminindex.asp")
else
response.write("<br>"&"<p>")
response.write"<center>用户名密码错!</center>"
end if
%>
<p align ="center">
<font size ="5" color ="#FF0000">请重新输入!</font><font size="5"> </font>
</p>
<table width="44%" border="1" cellspacing="1" cellpadding="1" align="center" bordercolordark="#FFFFFF" bordercolorlight="#000000">
<tr valign="top" align="center"> <td height="127"><br>
<form action="adminpass.asp" method="post" ID=Form1>
<p> 用户名: <input type=text size=15 name="user" ID=Text1> <br>
<p> 密 码 : <input type=password size=15 name="pass" ID=Password1>
<br> <p> <input type=submit value="管理登陆" ID=Submit1>
<input type=reset value="重 置" name="重设" ID=Reset1>
</form></td></tr> </table><br> <br>
</body>
</html>
下面是Conn.asp的代码:
<%
Dim Conn,Connstr
Conn=Server.CreateObject("ADODB.Connection")
Connstr="Driver={SQL SERVER};Server=Java;Uid=sa;Pwd=sa;Database=KeHu;"
If Err.number<>0 Then
Err.Clear
Set Conn=Nothing
Response.End
Else
Conn.Open Connstr
If Err Then
Err.Clear
Set Conn=Nothing
Response.Write "数据库连接出错"
Response.End
End If
End If
Sub EndConnection()
Conn.close
Set Conn=Nothing
End Sub
%>
在运行时报出如下错误.
ADODB.Recordset 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/客户管理系统/adminpass.asp,行 42
请各位高手帮忙.谢谢!!!!