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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Practice ADO/DAO

Status
Not open for further replies.

scottsanpedro

Programmer
Apr 26, 2002
97
GB
I am starting a new stand alone access project (access 2003). I have been writing in ADO for the pass 3 years, using SQL Server 2000 backend, not local tables.
I'm now wanting to use DAO ( I presume) for this project.

My question is, whats the best method to use as I'm using Access Local engine not SQL Server.
To add new records do I use ADO with unbound form or bound with DAO (i.e DoCmd.GoToRecord ,,acNewRec)

Many thanks

Scott
 
If you are working inside Access and not connecting to SQLServer for records or pass thrus or whatever then DAO is probably the better method to use. DAO was written for the Access Jet database engine and will work very well for record manipulation and form events.

Paul
 
To make things a bit clearer, when you use the term "project" do you actually mean an Access Project? Then you're using the MSDE engine. MSDE is also used for standalones.
If you mean you've been creating regular, old databases, then you're using the Jet engine.
DAO vs ADO is actually a chronological debate. DAO is left over from Access up to and through Office 97. Microsoft is no longer doing any upgrades to it. ADO took over in Office 2000 and is the preferred way to code according to Microsoft.
The choice is yours for a standalone. Since you already know ADO, use that.
 
fneily,

ADO is the preferred method, according to Microsoft, unless you are working with the Jet database engine. In this case MS still recommend DAO as the performance is significantly better than ADO.

Ed Metcalfe.

Please do not feed the trolls.....
 
Ed2020, you are correct. Which is strange that Microsoft says it won't do anymore development to DAO and yet, as you stated, it is the preferred method in a regular Access database that people use.
 
fneily,

I agree, it is a little strange. I'm still awaiting the announcement that Jet is being replaced with another database engine (something like MSDE perhaps?) in future Office releases.

Ed Metcalfe.

Please do not feed the trolls.....
 
<grin>Oh, did you miss the announcement? It was made in October 2005 by Eric Rucker ( stating that the Access team were developing a new version of the Jet engine to be shipped with the 2007 version of Access (
As for ADO vs DAO, here is same Rucker's reply to a blog comment - note - also stating/implying there's been development on DAO for this version
"DAO vs. ADO. In general DAO works better against Access. There are some scenarios where you need to run ADO, but outside of those, you're likely to get better perf from DAO.

What changed in DAO? Primarily the ability to connect to complex data.
"

Here is "New, More Complete Access Overview"
with more details about the fantastic new macro features, the multi value field type...

Around the release of Access 2000, Microsoft marketed ADO with vigour for Access/Jet developers. In retrospect, it would be fair to say that the effort had limited success, even if some of us do use ADO to some extent.

Roy-Vidar
 
Hmmm..... Looks like a really worthwhile upgrade, especially for professional developers!

Remind me - how much is Office 2007 again? I must rush out and buy a copy first thing tomorrow. :)

Ed Metcalfe.

Please do not feed the trolls.....
 
On the other hand it looks like it will be even easier for non-developers to create really bad Access databases that I have to take on, rebuild and then support, so at least it will keep me in gainful employment for a while longer. :)

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top