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

急!!!ADODB.Recordset 错误 '800a0bb9'
代码:
    <% ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '新留言提示
dim   newgbook
If   request.Cookies( "love ")( "username ") <> " "   and   request.Cookies( "love ")( "password ") <> " "   Then   '刚注册,不能登录
          set   rs=Server.CreateObject( "ADODB.recordset ")
          rs.open "select   username,new   from   love_gbook   where   username= ' "&request.Cookies( "love ")( "username ")& " '   and   new=1 ",conn,1,1   //此行提示出错
          if   not   rs.bof   and   not   rs.eof   then '找到记录
                newgbook=1
          end   if
          rs.close
End   if

出错提示:
      ADODB.Recordset   错误   '800a0bb9 '  

    参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。



------解决方案--------------------
在open前输出你的sql字符串看看
response.write "select username,new from love_gbook where username= ' "&request.Cookies( "love ")( "username ")& " ' and new=1 "
------解决方案--------------------
and new= '1 '
------解决方案--------------------
if rs.eof then....
------解决方案--------------------
为空也不应试出现这种错误呀,

建议放到数据库里运行试试看

或者你包含conn进来没有?