Click to See Complete Forum and Search --> : recordset with empty table
mutley
Jul 6th, 2000, 03:06 PM
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
Glenn
Jul 6th, 2000, 04:04 PM
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.
:)
Aldea
Jul 7th, 2000, 08:33 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.