Benefits of different recordset types

D

Dan

What are the benefits of specifying recordset types?

I mainly use the dbopentable... have been having
performance issues with losing connections... is one
recordset type better than another?

Is dbOpenSnapshot faster than dbOpenTable, use less
memory,...what about dbOpenDynaset or dbOpenForwardOnly...

Thanks,

Dan
 
L

Lance McGonigal

Seems to me that Microsoft gave me more options with dbopendynaset. I've
used it for years without any problems.

hth
 
A

Allen Browne

Use dbOpenDynaset unless you have a reason to use something else.

dbOpenTable works only on tables in the database you have open. It does not
work on linked tables, so don't use it if could split your database
(frontend/backend).

In most cases, the most efficient solution is to use a SQL statement that
gets the minimum number of records and fields, sorted in the order you need.
Again, you cannot use dbOpenTable with a SQL statement.

dbOpenTable does allow the very fast Seek method, so this approach is useful
where you must programmatically and randomly locate entries in a local
temporary table inside a loop, and you need most of the records and fields.
Other than that, use dbOpenDynaset.
 
J

John Vinson

What are the benefits of specifying recordset types?

I mainly use the dbopentable... have been having
performance issues with losing connections... is one
recordset type better than another?

Is dbOpenSnapshot faster than dbOpenTable, use less
memory,...what about dbOpenDynaset or dbOpenForwardOnly...

Thanks,

Dan

Just to add to the suggestions... if you don't need to edit the data
(or don't want it to be editable), and don't need it to automatically
refresh when other users enter data, OpenSnapshot is apparently very
fast.
 
T

Tim Ferguson

Just to add to the suggestions... if you don't need to edit the data
(or don't want it to be editable), and don't need it to automatically
refresh when other users enter data, OpenSnapshot is apparently very
fast.

Just to add again, using the ForwardOnly option for the snapshot is faster
again (and uses less memory) if you are only going to read forward through
the recordset without going backwards.

HTH


TimF
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top