Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When is it best to use DAO? When to use SQL?

Status
Not open for further replies.

Jackvmae

Programmer
Feb 18, 2004
17
0
0
US
In a regular Access 2000 MDB networked file/server database you can use DAO to add, delete and edit records. You can also use SQL to do the exact same things.

In what circumstances would you say it's best to use DAO and when is it best to use SQL?

Right now I feel my code is sort of sloppy because sometimes I use one and other times I use another without any serious consideration as to why.

Thanks for any tips.

Jack
 
Jack

I would say use DAO when you need to manipulate the actual objects within the database (eg tables, queries) and use SQL to access or manipulate the actual data.
No problem mixing the two, they do coexist nicely, but if you start mixing ADO and DAO code, the newer versions of Access can get very confused.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top