What should I use inside Access: DAO or ADO?

F

Filipe Martins

Hello.

In older Access versions, when we created a new database it
automatically referenced DAO. But Access 2002 referenced ADO - so I'
ve learn ADO (which doesn't seamed to me sou powerfull as DAO).
Now Access 2003 references both!

What should we use?

(e-mail address removed)
 
J

John Nurick

Hi Filipe,

Use whichever you prefer. As you say, there are some things that can be
done with DAO but not ADO.
 
R

Roger Carlson

I continue to use DAO for Access-Only solutions. ADO doesn't give me
anything I don't already have with DAO and I lose some functionality.
 
B

Bruce M. Thompson

In older Access versions, when we created a new database it
automatically referenced DAO. But Access 2002 referenced ADO - so I'
ve learn ADO (which doesn't seamed to me sou powerfull as DAO).
Now Access 2003 references both!

What should we use?

If your database is using only the MDB file format, DAO would be the preferred
library, but if you are more familiar with ADO then go ahead and continue to use
that. You may find, however, that, as mentioned by others in this thread, some
things just need to be done, or are more easily done, using DAO.
 
F

Fred Exley

I continue to use DAO for Access-Only solutions. ADO doesn't give me
anything I don't already have with DAO and I lose some functionality.


My sentiments exactly. I've tried re-doing some DAO modules that work
perfectly fine to ADO, just to stay 'with it', and couldn't get anything
complicated to work right. For example, if in an Access 2002 module you
highlight 'OpenQueryDef' and hit F1, you'll get a page titled "Obsolete
Features in DAO". The 'Database.OpenQuerydef method' is now supposed to be
done with the 'Querydefs collection'.

OK, so I screwed around a bit trying to convert this statement:
" Set IngrQuerydef =
..OpenQueryDef("qryGetCorrespondingIngedrientsRecord") "

And never did get it to work right, probably because the called query uses
parameters passed to it, and that's some other obsolete way of doing things,
I guess.... I'm not sure why it didn't work, and I'm not asking for help
here. My point is, after spending hundreds of man-hours learning DAO, I see
no 'technical' reason to throw all that out and spend hundreds of hours
learning ADO. By the the time I've mastered that, ADO will be obsolete by
decree of Microsoft, and we'll all be expected to buy their next thing.

I don't believe for a second these are necessary 'technical'
advancements -it just marketing to keep all of us locked into the Microsoft
monopoly, and to make us keep feeding the beast our $$$ and time and effort.
My fear is that sooner or later Microsoft will pull the plug on DAO
libraries, and force everybody to convert to ADO. If and when that happens,
I'll instead convert to a different company's products -Oracle or whatever.

There was an old joke going around about 10 years ago about the Chairman of
General Motors saying, "If G.M. designed cars the way Microsoft designs it's
software, every time you bought a new car from us you'd have to learn to
drive all over again, because all the controls had been rearranged ." So
true then, so true today...
 
F

Fred Exley

Thanks much Henry -very interesting site! It's most reassuring to learn DAO
isn't going away anytime soon.

Sometimes I feel like Michael Douglass's character in the movie "Falling
Down", as when he was stuck in traffic because road workers were tearing up
the road. He was told to wait, or go around, or beat it, because they we're
fixing the road, and if he didn't like it, too bad. After pulling out a
bazooka or something, the road design engineer admitted, "There never was
anything wrong with the road, we're just tearing it up to stay in business."

Or something like that...
 
F

Fred Exley

p.s. I also learned a great new word from his site: 'Disambiguate'
as in:

Disambiguate each declaration, by specifying the library you intend, e.g.:
Dim rs As DAO.Recordset:)
 
R

Ragnar Midtskogen

Hello Henry

Where did you get that information from? In Access 2000 and 2002 the default
is ADO, have MS changed their mind?
According to Allen Browne the reference to DAO is included by default, it
does not say that ADO is not included.
I don't have 2003 so I have no idea what it does. It would seem strange that
after all the PR pushing ADO MS would backtrack.

Ragnar
 
T

Tony Toews

Ragnar Midtskogen said:
Where did you get that information from? In Access 2000 and 2002 the default
is ADO, have MS changed their mind?

Musta because that's what I see too. DAO 3.6 is above ADO 2.5 on an
A2003 format MDB I just created.
I don't have 2003 so I have no idea what it does. It would seem strange that
after all the PR pushing ADO MS would backtrack.

Nope it's practical. Cuts down on their support calls. <smile>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top