Results 1 to 3 of 3

Thread: recordset with empty table

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Unhappy

    Hi

    I am using VB 6 WITH ADO and ADO.RECORDSET, but when I use a query in table empty I can not see the recordset, I tried isnull(rs(0)), len(rs(0))

    Help me

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    If you are trying to see if the recordset is empty. Check EOF and BOF, if there both true the recordset is empty.

    If this doesn't answer your question, let us know.
    Glenn D
    Development/Analyst

  3. #3
    New Member
    Join Date
    Jun 2000
    Posts
    8

    Cool

    Like Glenn said with EOF and BOF,hope it will work.
    you declare the function(it's taken from a example-I use it)

    Function NoRecord(rs As Recordset) As Boolean
    NoRecord = False
    If (rs.EOF = True And rs.BOF = True) Then
    NoRecord = True
    End If
    End Function

    Then you use it:
    if NoRecord(rs) then
    msgbox "Empty recordset!"
    end if
    Bye.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width