Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using Large Dynasets

I have a VB app that I use to correct records on an Rdb database on a VAX. I am using Microsoft's TCP/IP and DEC's ODBC drivers. Our databases can get VERY large (in the hundreds of thousands to millions). I create a Dynaset of an entire table and start at the beginning. Almost none of my users will begin their editing process there - they need a means to launch to the record they want. It seems that FindFirst is much too slow (a few hours) to ever be useful. I'd like to make use of the indexes, but it seems I can't create Table objects with ODBC, so "Seek" appears to be unavailable as an option. My solution thus far has been to create only dynasets of one record. This is still too slow. Is there a better way to get to my records? I've read just about everything I can get my hands on.

A couple of notes that are fairly obvious to you: Dynasets are slower than snapshots, since they have to create a connection to the database. Also, the ODBC is going to slow it down somewhat more, but it is negligible after the first operation.

What about providing your users with an intermediate search screen? It sounds like they know what they want to edit, they just have to get there. If you can narrow that million records down to a few thousand, things will run much better. As far as searching recordsets, you will probably have to do something like this:

dDm iFound as integer
iFound = False
Do While not dsData.EOF and not iFound
   iFound = dsData(field) = 'criteria'
   if not iFound then dsData.MoveNext
This is reliable for searching dynasets and snapshots.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date