devxlogo

Using Large Dynasets

Using Large Dynasets

Question:
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’sODBC drivers. Our databases can get VERY large (in thehundreds of thousands to millions). I create a Dynaset ofan entire table and start at the beginning. Almost none ofmy users will begin their editing process there – they needa means to launch to the record they want. It seems thatFindFirst 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’tcreate Table objects with ODBC, so “Seek” appears to be unavailable as an option. My solution thus far has beento create only dynasets of one record. This is still tooslow. Is there a better way to get to my records? I’ve readjust about everything I can get my hands on.

Answer:
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 integeriFound = FalsedsData.MoveFirstDo While not dsData.EOF and not iFound   iFound = dsData(field) = ‘criteria’   if not iFound then dsData.MoveNextLoop
This is reliable for searching dynasets and snapshots.

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist