日期:2014-05-17  浏览次数:21058 次

还是检查不出来错在哪里.请大虾们帮帮忙!参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
conn.asp
<%..........
sub   DBConnection1(DBPath)
      set   conn=server.CreateObject( "ADODB.Connection ")
      connstr= "Provider=Microsoft.JET.OLEDB.4.0;Data   source= "&server.MapPath(DBPath)
      on   error   resume   next
      conn.open   connstr
end   sub
............
%>

searchhouse.asp
<%
db_path= "data/Resource.mdb "
call   DBConnection1(db_path)
Set   rst=Server.CreateObject   ( "ADODB.Recordset ")
        mysql= "SELECT   *   FROM   LSResource   WHERE   1=1 "
if   types <> " "   then
mysql=mysql+ "   and   资料类型= ' "&types1& " ' "
end   if
if   shiqu <> " "   then  
mysql=mysql+ "   and   简略地址   like   '% "&shiqu& "% ' "
end   if
      ............
    .............
rst.open   mysql,conn,2,2     ------------第   69   行
if   rst.eof   or   rst.bof   then  
      response.write   "没有房源 "
      response.End()
end   if
.............
%>
错误类型:
ADODB.Recordset   (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/tjfy/searchhouse.asp,   第   69   行


------解决方案--------------------
检查你的返回值 types1和 shiqu 的值是否 string类型,因为类型不匹配,应该是这里错了
------解决方案--------------------
楼主在连库语句里把on error resume next去了试试
------解决方案--------------------
types1和shiqu这2个变量在哪里获取的???为空?
。。。。。。。。。
没request吧
------解决方案--------------------
connstr= "Provider=Microsoft.JET.OLEDB.4.0;Data source= "&server.MapPath(DBPath)
这个可以换个驱动程序试试