ADO vs. DAO

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Up to now I have written all of my code using ADO
Pretty much everything I've learned came from the "Microsoft Office 2000 Visual Basic Programmer's Guide" ehich uses ADO for all of it's examples
Everything works but certain things are tricky to code and take a while to run

Most of the answers I am seeing in this forum use DAO

In some cases, ADO is the only way to make something work
In other cases, either one can be used

Is there an unwritten rule about mixing the two or not mixing the two

Thanks for your opinions
 
There is no rule that I know of about using DAO and ADO
separately or combined. The one rule that I would stress
whether they are used individually or together is that
declarations should always contain the appropriate prefix.
So
Dim rst As Recordset is bad
Dim rst As ADO.Recordset or
Dim rst As DAO.Recordset is good.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
Up to now I have written all of my code using ADO.
Pretty much everything I've learned came from the
"Microsoft Office 2000 Visual Basic Programmer's Guide"
ehich uses ADO for all of it's examples.
 
In some cases, ADO is the only way to make something work.
In other cases, either one can be used.

I don't believe the first one of these[1]. DAO is far more flexible, more
powerful and faster than ADO -- but it is highly tied to Jet databases
where ADO is designed to be a all-purpose library for interacting with
diverse back end types and architectures. There are stacks of things you
can only do with DAO.

[1] Only counter example I am aware of is a few DDL clauses that never made
it into Jet SQL like DEFAULT and some CONSTRAINTs.

B Wishes


Tim F
 
I'm a bit late, but I'll add my $.02.

Forms RecordsetClone methods return DAO recordsets.

If you want to move to SQL Server, ADO now might make
better sense.

But, use what you know..... I use DAO for QueryDefs and
TableDefs. It's easier for me.



Chris

-----Original Message-----
Up to now I have written all of my code using ADO.
Pretty much everything I've learned came from
the "Microsoft Office 2000 Visual Basic Programmer's
Guide" ehich uses ADO for all of it's examples.
 
Back
Top