Need help understanding RecordSets

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI!!

I need someone to tell me whats the difference between
writing :

dim rsnew as RecordSet
AND
dim rsnew as DAO.RecordSet

I've been programming for the past 1 1/2 or so and I've
always used the first line of code. Should I be using the
2nd one, and if so, Why??

I'm curious to know, because when I read certain posts I
always see the declaration as DAO....

Can someone help me?
 
where DAO and ADO are both available, the system needs to
know which one to use. in such cases, your first line of
code would produce an error.

suggest you get in the habit of designating the
appropriate recordset type. that way, if your db ever runs
on a system that has both DAO and ADO, the system will
always know which to use.
 
Thanx for your help, how do I know which version to use or
when to use them. Is DAO better in some cases and ADO in
others. What's your rule-of-thumb when declaring your
recordSets. is one better then the other??

Thanx again...
 
Patrick said:
Thanx for your help, how do I know which version to use or
when to use them. Is DAO better in some cases and ADO in
others. What's your rule-of-thumb when declaring your
recordSets. is one better then the other??

When working with databases in the .mdb file format, DAO is more
powerful and more efficient than ADO. If you are developing simple .mdb
applications, then stick with that except for educational exercises. If
you are working with Access Data Projects (.adp files) or with other
types of database (especially SQL Server), or if you anticipate that you
will be upsizing your applicaton to a client-server database, or if you
just want to get familiar with ADO for future efforts, then use ADO.
There could of course be exceptions to this rule of thumb, but this is
what I have always been told.
 
Thank you very much for your help...
-----Original Message-----


When working with databases in the .mdb file format, DAO is more
powerful and more efficient than ADO. If you are developing simple .mdb
applications, then stick with that except for educational exercises. If
you are working with Access Data Projects (.adp files) or with other
types of database (especially SQL Server), or if you anticipate that you
will be upsizing your applicaton to a client-server database, or if you
just want to get familiar with ADO for future efforts, then use ADO.
There could of course be exceptions to this rule of thumb, but this is
what I have always been told.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top