Search Tools Links Login

Faster Recordset Searching

Posted: 2019-09-13
By: FredrickPhua
Viewed: 194

Filed Under:

VB6 Databases, VB6 Code Cache

No attachments for this post


This really can make your database searching much faster if you implement this to a big database.

In normal search:

Do While Not record.EOF
   [search criteria]
   record.MoveNext
Loop

To improve the search process, you can use this method:

Record.MoveLast
intCount=Record.RecordCount
Record.MoveFirst

For i=1 To intCount
   [search criteria]
   Records.MoveNext
Next i

It can improve arround 40% faster. Try it!!

Special Instructions

This code originally appeared on AndreaVB.com, and has been republished here with the permission of Andrea Tincani.


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.