Determine if an ADO Recordset Has Records

Category:
Database
Type:
Snippets
Difficulty:
Beginning
Author:
Adrian Henning

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This is a rather comprehensive function to determine if an ADO Recordset has records, in that it ir tests if the recordset object has been instantiated and if it is open before getting to the EOF and BOF test. Also can be used optionally to return the number of records.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: