Search Tools Links Login

Proper ADO Recordset

To remedy difficiencies in ADO, namely single criteria in the .FIND method.
We encapsulated an ADODB.Recordset within a vb6 class module, and created four methods (FindFirst, FindLast, FindNext, FindPrevious) which allow for more that one criteria.

Original Author: Jeff Jonsson


Use is almost exactly that of a standard ADODB.Recordset.


Just drop the class module into a project, and rename all:
Dim aRecSet as ADODB.Recordset
Dim aRecSet as ProperADORecordset
then CTRL-F5 to find and replace all Open/Close methods with OpenIt/CloseIt.
Any new properties/methods simply pass arguments/return values between the encapsulated ADODB.Recordset and the created class module.


Returns less headaches.

Side Effects

First, not all properties/methods have been emulated. Easy enough to do though. Left as an exercise.
Second, due to vb limitations, Open/Close not supported, but renamed as OpenIt/CloseIt.

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 97 times


Visual Basic 6

Posted: 9/3/2020 3:45:00 PM
Size: 3,536 bytes

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.