Solved

DAO v ADO

Posted on 2004-08-15
18
1,236 Views
Last Modified: 2008-01-09
I just got myself a copy of Access 2003 at home and was surprised that the Northwind db used DAO not ADO.

I use A97 for all my apps so im pritty much limited to DAO anyway, but i was wondering why MS still used DAO in their sample db.


Open for discussion,  not really looking for an answer....

Dave
0
Comment
Question by:flavo
  • 4
  • 4
  • 3
  • +5
18 Comments
 
LVL 8

Assisted Solution

by:dkmj17
dkmj17 earned 50 total points
ID: 11806075
If I had to guess... I would say it is to minimize work... I haven't looked at the northwinds in a while- but maybe they just took the 97 version and made a few minor changes, then sent that as the 2003...

Mike
0
 
LVL 34

Author Comment

by:flavo
ID: 11806085
That's what i thought, lazy, to busy with those new looking buttons to worry about doing an up to date sample?
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 11806277
I think Microsoft is veering away from ADO in favor of ADO.Net.

Peter De Baets
http://www.peterssoftware.com
0
 
LVL 34

Author Comment

by:flavo
ID: 11806285
Yes, i am well aware of that, still doesn't explain why they decided to use DAO not ADO.  Considering Access will only let you use either one (or maybe RDO) without going to a .Net FE, i am curious as to why they used DAO.

why should i use ADO rahter than DAO (if i used A2k+) when they dont bother?

I know it enables you to upgrade to SQL server, but any other reason???

Dave
0
 
LVL 17

Assisted Solution

by:walterecook
walterecook earned 50 total points
ID: 11806961
Theoretically ADO is more extensible into the future as someday DAO will go away.  personally, though I know ADO, I usually go lazy and write in DAO as I can just do it so much faster.

Walt
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 150 total points
ID: 11808581
According to several postings I've read on this, MS decided to repalce DAO as a default reference in 2003, due primarily to people complaining about it!!

As I see it, there's little reason to use ADO over DAO in a pure Access evnironment. DAO works better with Access, and is a complete solution (there are a few issues with ADO and User LEvel Security, plus DAO is faster in terms of data access). If, however, you EVER believe your application will be used with a different datastore (Oracle, MSSQL, MySql, etc etc) then I'd write my data access with ADO.
0
 
LVL 8

Assisted Solution

by:plq
plq earned 50 total points
ID: 11808598
You can do things in DAO that you can't do in ADO like createquerydef, tables.append etc.

And the real good thing in DAO although probably not used in northwind is cross database queries, where you can join one table in one db to another table in a different db

Performance wise, they're both crap, so it comes down to what you prefer and what you know. Even ADO.NET isn't as functional as ADO in some ways, so I'd wait for ADO2.NET in whidbey before moving to ADO. At least DAO is built to perform well with access, so its probably less layers than ADO if you're sticking with an access db.
0
 
LVL 2

Assisted Solution

by:namliam_eht
namliam_eht earned 50 total points
ID: 11808748
And dont forget all Jet recordsets by default are DAO. Like the me.recordsetclone and stuff.

Basicaly DAO has been split into several defirent parts ADO beeing one of them. I am unsure where they put the querydef and stuff tho. I have also been told that in the move from DAO (split) to ADO (and others) they purposly left out some parts of DAO....

"my $0.02"
0
 
LVL 84
ID: 11808905
>> You can do things in DAO that you can't do in ADO like createquerydef, tables.append etc.

Technically, you're correct, although you can use ADOX to do these things. Still, there are some limitations in regards to using ADOX, and I'd agree with you regarding using DAO with Access.

>> Basicaly DAO has been split into several defirent parts ADO beeing one of them

I've never heard this - ADO is probably more closely associated with RDO than DAO. I'm sure many of the same strategies were used to build both libraries - after all, they basically accomplish the same thing - but I don't think that you could argue that ADO was derived from DAO. If I'm wrong (and that's entirely possible), then I'd really enjoy reading some information on this!!
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

by:namliam_eht
ID: 11810850
Hmz, well Its what i heard/read about and around from both co-workers and here and there on the web... Tho i have never heard of RDO.. till now that is LOL... You learn something new every day....

I personaly never used ADO, stick to what you know i allways say. And i havent found the need to use/switch to ADO.

I even heard that eventhought ADO is the default library for both 2k and XP, M$ switched back to DAO as the default for 2003....

Just another $0.02
0
 
LVL 84
ID: 11811304
Yes, 2003 now includes by default a reference to the DAO library.

BTW, here's some references to the history of ADO. It's been around since 1996, although the first semi-stable relase would have been 1.5

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmscwhatsnewinado.asp
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccessdev/html/odc_microsoftofficedeveloperforumaccessadvancedadoforthevbaprogramme.asp

In some way, you could say that ADO "came from" DAO - after all, Microsoft built\borrowed both of the technologies, and if they had code libraries that could be used to interface with the lower level drivers, I'm sure they used those when considering strategies for the creation of ADO (much like you have a library of code that you use over and over).
0
 
LVL 39

Assisted Solution

by:stevbe
stevbe earned 150 total points
ID: 11813824
One thing you can do in ADO that you can not in DAO is build a recordset in memory ... no need for a table or any other datasource. It also is easier to disconnect and save out as xml, etc.

Another piece of DAO that was split out to a new library was replication into the JRO library.

ADO does replace other things ... like file I/O, you can open a text fiel and read the stream.

In DOA you can open a recordset for append only ... no need for bogus criteria to make sure you are not returning a boatload of records when all you want to do is add.

If you think the differences between ADO and DAO are substantial the only thing ADO and ADO.NET have in common is the letters ADO. They are structured entirely different.

I keep waiting for Office to become VBA.NET :-)

Steve
0
 
LVL 39

Expert Comment

by:stevbe
ID: 11813862
As for the code in Nothwinds ... Not on your life would I allow code like that in one of my Apps :-)
I am sure they just tweak it to keep it limping along for each new version, it is just like DAO, they need to keep it aroud for compatability reasons only. If MS thought they could get away with killing DAO they would, but they can't because there is too much legacy code in production in fortune 500 companies for them to say ... nope, it no longer exists. Come on ... you can still write .bat files and that "went away" a long time ago.

Steve
0
 
LVL 84
ID: 11813867
Yes ... I really like the disconnected recordset in ADO ... I've incorporated a strategy in my unbound apps that uses a disconnected recordset as "pointers" for the fronent ... I include my ID field(s) in the disconnected recordset and use that to grab data at the user's request. It allows me to build navigation buttons without tying up the entire table, and I can mimic the "feel" of Access.

So far I haven't really gotten into much XML, although the next big project from one of my aerospace clients will be very heavily dependant on data formatted in xml, so I'm beginning the learning process. Seems like a very portable, easily understood format ...
0
 
LVL 39

Expert Comment

by:stevbe
ID: 11813944
The bigest thing I found in XML was learning schema validation ... I am so spoiled with "tables" and "relationships" enforcing validation, all I have to do is pick up the pieces in Access, that it took a while for me to be able to write the schema in XML. One of the reasons I found it tough is the extreme flexibility, you can create complicated requirements, way beyond what Access tables are capable of but it can be very hairy when you start to try and validate relationships ... ughhh.

There is not "right" way to store data in XML, whether "field" values are properties of a node or each field is a seperate node itself. You need to figure out how you are going to do this before you can even create the schema.

Steve
0
 
LVL 34

Author Comment

by:flavo
ID: 11815345
Gee's, you guys have been busy while i was sleeping.

Yes, i noticed DAO was the dafault in 2003, and was sure it wasn't in 2002 (confirmed now).

>> I keep waiting for Office to become VBA.NET :-)

Yes, i was wondering about that... Maybe Office 2005????....

I too haven;t really got into xml, just as much as i need...

Im glad i started this up, some good thoughts from all...

Seeing as it will be near imposible for me to use the Oracle servers for my apps, ill be more than happy to stick to DAO ( i  have too anyway...)

>> As for the code in Nothwinds ... Not on your life would I allow code like that in one of my Apps :-)

Not the best now is it...

Thanks guys!

Dave
0
 
LVL 34

Author Comment

by:flavo
ID: 11815365
I tired to split the points up, hope everyone is content.
0
 
LVL 2

Expert Comment

by:namliam_eht
ID: 11818746
I actually was not expecting anything.... But hey thanx :)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now