ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其 10
ifrequest("action")="login"thenadmin_name=request("admin_name")admin_pass=request("ad...
if request("action")="login" then
admin_name=request("admin_name")
admin_pass=request("admin_pass")
if instr(admin_name,"'") > 0 or instr(admin_pass,"'") >0 then
response.Write "请不要用非法字符"
else
%><%
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin where admin_name='"& admin_name &"' and admin_pass='"& admin_pass &"'"
rs.open sql,conn,3,3
if rs.eof then
response.Write "<center><font color=#FF0000 size=4><b>用户名和密码不匹配!!!</b></font>"
else
session("admin_name")=rs("admin_name")
response.Redirect "manage.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
conn 是
<%
dim cnn
set cnn = server.createobject("ADODB.Connection")
cnn.Connectionstring ="Provider = Microsoft.Jet.Oledb.4.0; data source=" & _
server.MapPath ("shishang.mdb")
cnn.open
%>
错误是
ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其 展开
admin_name=request("admin_name")
admin_pass=request("admin_pass")
if instr(admin_name,"'") > 0 or instr(admin_pass,"'") >0 then
response.Write "请不要用非法字符"
else
%><%
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin where admin_name='"& admin_name &"' and admin_pass='"& admin_pass &"'"
rs.open sql,conn,3,3
if rs.eof then
response.Write "<center><font color=#FF0000 size=4><b>用户名和密码不匹配!!!</b></font>"
else
session("admin_name")=rs("admin_name")
response.Redirect "manage.asp"
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
conn 是
<%
dim cnn
set cnn = server.createobject("ADODB.Connection")
cnn.Connectionstring ="Provider = Microsoft.Jet.Oledb.4.0; data source=" & _
server.MapPath ("shishang.mdb")
cnn.open
%>
错误是
ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其 展开
1个回答
展开全部
if request("action")="login" then
admin_name=request("admin_name")
admin_pass=request("admin_pass")
写完整,改为:
if request.q...("action")="login" then
admin_name=request.from("admin_name")
admin_pass=request.from("admin_pass")
同时检查数据库中这两个字段的类型,然后相应转换从表单传递过来的这两个值,以和数据库字段类型一致
admin_name=request("admin_name")
admin_pass=request("admin_pass")
写完整,改为:
if request.q...("action")="login" then
admin_name=request.from("admin_name")
admin_pass=request.from("admin_pass")
同时检查数据库中这两个字段的类型,然后相应转换从表单传递过来的这两个值,以和数据库字段类型一致
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询