当前位置: 代码迷 >> ASP >> :ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突
  详细解决方案

:ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突

热度:501   发布时间:2012-02-24 16:30:39.0
求助:ADODB.Recordset (0x800A0BB9)参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
错误类型:
ADODB.Recordset   (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/1/2002716114847_75960/公司通讯录/Jaddress1.0/listmember.asp,   第   25   行
'程序如下
<!--#include   file= "db.asp "-->
<!--#include   file= "session.asp "-->
</head>

<body   topMargin=0   marginheight= "0 "   leftMargin=0   vlink= "#000000 ">
    <table   border= "0 "   width= "100% "   bordercolorlight= "#000000 "   cellspacing= "0 "   cellpadding= "0 "   bordercolordark= "#FFFFFF ">
        <tr>
            <td   width= "100% ">
                <table   border= "0 "   width= "100% "   bordercolorlight= "#000000 "   cellspacing= "0 "   cellpadding= "4 "   bordercolordark= "#FFFFFF ">
                        <%
dim   conn1,rs,CurPage1,sql1
If   Request.QueryString( "CurPage1 ")   =   " "   or   Request.QueryString( "CurPage1 ")   =   0   then
CurPage1   =   1
Else
CurPage1   =   CINT(Request.QueryString( "CurPage1 "))
End   If
display   =   CurPage1
sql1= "Select   *   From   address   order   by   id   desc "
set   rs=server.createobject( "adodb.recordset ")
rs.open   sql1,conn1,1,1       <--------------------出错处!
%>
其中db.asp
<%
Dim   conn,strConn
Set   conn=Server.CreateObject( "ADODB.Connection ")
strConn= "Driver={SQL   Server};Server=home;Uid=sa;pwd=751003;DataBase=txl "
conn.open   strConn
%>
其中session.asp
<%
if   session( "password ") <> " "   then
  Set   rs=   Server.CreateObject( "ADODB.Recordset ")
sql= "select   *   from   manager "
rs.open   sql,Conn,1,1
rs.movefirst  
if   session( "password ") <> rs( "password ")   then
response.redirect   "login.asp "
end   if
rs.close
else
response.redirect   "login.asp "
end   if
%>
请各位高手指点,谢谢!

------解决方案--------------------
像楼主这样的问题,一般都是关键字如CONN,RS,等这些哪里给疏忽了,仔细检查就能查到了
------解决方案--------------------

sql1= "Select * From address order by id desc "

->


sql1= "Select * From [address] order by [id] desc "试下,同时确认address表中有id字段的存在
  相关解决方案