ADODB.Recordset 错误 '800a0bb9' 参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 5
看到这个错误,我弄了几个小时,快哭了,谁来救救我吧!ADODB.Recordset错误'800a0bb9'参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。/s...
看到这个错误,我弄了几个小时,快哭了,谁来救救我吧!
ADODB.Recordset 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/student/check.asp,行 24
下面是login.asp部分:
<form action="check.asp" method="post" name="form" id="form">
<td width="17%" align="right">用户名:</td>
<td width="83%"><label>
<input type="text" name="username" id="username">
</label></td>
<td align="right">密码:</td>
<input type="password" name="password" id="password">
<input name="RadioGroup" type="radio" id="RadioGroup_0" value="student" checked>
学生</span></label>
<span class="login_txt">
<label>
<input type="radio" name="RadioGroup" value="teacher" id="RadioGroup_1">
老师</label>
<label>
<input type="radio" name="RadioGroup" value="admin" id="RadioGroup_2">
管理员</label>
</span>
<input name="login" type="submit" class="Submit" id="login" value="登录">
<input name="cancel" type="submit" class="Submit" id="cancel" value="取消" onClick="window.close();">
</form>
下面是check.asp:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn.asp" -->
<%
Dim username,password
username=request.form("username")
password=request.form("password")
%>
<%
select case request.form("RadioGroup")
case "admin"
dim rs,sql
set rs=server.CreateObject("ADODB.Recordset")
sql="select * from dbo.Admin_Info_Table where admin_name='"&username&"' and admin_pass='"&password&"'"
rs.open sql,conn,1,1 <-这里报错
if rs.eof and rs.bof then
response.write "<script>alert('密码或用户错!');window.location.href='login.asp'</script>"
response.End()
else
session("username")=rs("admin_name")
response.redirect "admin/admin_index.asp"
rs.close
set rs=nothing
end if
case "teacher"
response.redirect("teacher/teacher_index.asp")
case "student"
response.redirect("student/student_index.asp")
case ""
response.redirect("error.asp")
end select
%>
求解决方法!
dbo.Admin_Info_Table 这个表中就只有admin_name和admin_pass,他们的数据类型都为nvarchar(20)! 展开
ADODB.Recordset 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/student/check.asp,行 24
下面是login.asp部分:
<form action="check.asp" method="post" name="form" id="form">
<td width="17%" align="right">用户名:</td>
<td width="83%"><label>
<input type="text" name="username" id="username">
</label></td>
<td align="right">密码:</td>
<input type="password" name="password" id="password">
<input name="RadioGroup" type="radio" id="RadioGroup_0" value="student" checked>
学生</span></label>
<span class="login_txt">
<label>
<input type="radio" name="RadioGroup" value="teacher" id="RadioGroup_1">
老师</label>
<label>
<input type="radio" name="RadioGroup" value="admin" id="RadioGroup_2">
管理员</label>
</span>
<input name="login" type="submit" class="Submit" id="login" value="登录">
<input name="cancel" type="submit" class="Submit" id="cancel" value="取消" onClick="window.close();">
</form>
下面是check.asp:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conn.asp" -->
<%
Dim username,password
username=request.form("username")
password=request.form("password")
%>
<%
select case request.form("RadioGroup")
case "admin"
dim rs,sql
set rs=server.CreateObject("ADODB.Recordset")
sql="select * from dbo.Admin_Info_Table where admin_name='"&username&"' and admin_pass='"&password&"'"
rs.open sql,conn,1,1 <-这里报错
if rs.eof and rs.bof then
response.write "<script>alert('密码或用户错!');window.location.href='login.asp'</script>"
response.End()
else
session("username")=rs("admin_name")
response.redirect "admin/admin_index.asp"
rs.close
set rs=nothing
end if
case "teacher"
response.redirect("teacher/teacher_index.asp")
case "student"
response.redirect("student/student_index.asp")
case ""
response.redirect("error.asp")
end select
%>
求解决方法!
dbo.Admin_Info_Table 这个表中就只有admin_name和admin_pass,他们的数据类型都为nvarchar(20)! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询