VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Proper ADO Recordset

by Jeff Jonsson (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

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.

Inputs
Use is almost exactly that of a standard ADODB.Recordset.
Assumes
Just drop the class module into a project, and rename all: Dim aRecSet as ADODB.Recordset to: 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.
Code Returns
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.

Rate Proper ADO Recordset

Download Proper ADO Recordset

Download Proper ADO Recordset (3 KB)

Proper ADO Recordset Comments

No comments have been posted about Proper ADO Recordset. Why not be the first to post a comment about Proper ADO Recordset.

Post your comment

Subject:
Message:
0/1000 characters