你是不是在判断前将rs关闭了,还有为什么要判断null呢,没有纪录用BOF=EOF也可以判断阿

解决方案 »

  1.   

    不用isnull
    判断记录机为空用
    if rs.eof and rs.bof then ...
      

  2.   

    我想你的问题出在存储过程中,可能在存储过程中没有执行到select 语句,
    这样返回一个关闭的rs.
      

  3.   

    把If Not IsNull(rs) Then 改成 If Not rs Is Nothing Then
      

  4.   

    If rst.State = adStateOpen Then
        If rst.RecordCount > 0 Then MsgBox "rst not empty"
    else
        msgbox"rst is closed"
    end if 
      

  5.   

    我用rs.status=1判断该对象是否以关闭,但是这里也不通过,出错了,
    并且我用如下语句检查还是不行:
    isobject(rs) true
    isnull(rs) flase
    rs is nothing  flase
    rs.eof 报错我并没有 set rs=nothing或把rs关掉.