Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Which Microsoft ActiveX Data Objects 2.x Library should I reference?

3,825 views
Skip to first unread message

MM

unread,
Nov 25, 2010, 12:20:03 PM11/25/10
to
On my PC I have in Available References:
- Microsoft ActiveX Data Objects 2.0 Library
- Microsoft ActiveX Data Objects 2.1 Library
- Microsoft ActiveX Data Objects 2.5 Library
- Microsoft ActiveX Data Objects 2.6 Library
- Microsoft ActiveX Data Objects 2.7 Library
- Microsoft ActiveX Data Objects 2.8 Library

Currently I have referenced 2.1 and am using a disconnected recordset
(no database) which is saved into a file using adPersistADTG, then
subsequently Opened in another session.

I note that Windows 2000, XP and so on have a version of MDAC
installed as standard.

If the version installed is later than, say, 2.1 will it fall back to
supporting my app which was coded with 2.1 referenced?

MM

Nobody

unread,
Nov 25, 2010, 1:03:34 PM11/25/10
to
"MM" <kyli...@yahoo.co.uk> wrote in message
news:a86te614i9vmusdje...@4ax.com...

Everything except the latest version points to a type library that limits
what functionality you can use, so you don't use new features after that
version. However, all these type libraries point to the latest DLL on your
system, 2.8 in this case. Windows 2000 came with ADO 2.5, so if you choose
ADO 2.5, you technically don't need to install MDAC on Windows 2000 and
after, and that means smaller downloads. However, all of your testing is
going against ADO version 2.8, so if you don't distribute MDAC 2.8, users
who have lesser versions might see issues that were fixed in 2.8. So the
best practice is to distribute the same MDAC version as the highest you see
in the list, 2.8, except on Vista and after, since Vista and after come with
ADO 6.0, just like the OS version.

I would choose ADO 2.5 without distributing MDAC, and deal with any errors
that customers with lower versions might report, or test on these versions.

See also this blog entry by Tony Toews about this issue:

I've never quite trusted ADO because...
http://msmvps.com/blogs/access/archive/2010/07/01/i-ve-never-quite-trusted-ado-because.aspx


Tony Toews

unread,
Nov 25, 2010, 3:25:53 PM11/25/10
to
On Thu, 25 Nov 2010 13:03:34 -0500, "Nobody" <nob...@nobody.com>
wrote:

You took the words right out of my keyboard!

>See also this blog entry by Tony Toews about this issue:
>
>I've never quite trusted ADO because...
>http://msmvps.com/blogs/access/archive/2010/07/01/i-ve-never-quite-trusted-ado-because.aspx

Whoohoo! A blog entry of mine gets quoted in the VB6 newsgroups.
I've finally gotten a small amount of respect here despite my working
in Access. Hehehehe. Just kidding.

Tony

--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

MM

unread,
Nov 25, 2010, 4:08:20 PM11/25/10
to
On Thu, 25 Nov 2010 13:03:34 -0500, "Nobody" <nob...@nobody.com>
wrote:

>"MM" <kyli...@yahoo.co.uk> wrote in message

Okay, thanks for that. Note that I'm only going to be using ADO in a
fairly minimalist way to support disconnected recordsets saved
to/loaded from a file (no database).

MM

ralph

unread,
Nov 26, 2010, 4:41:42 AM11/26/10
to

The simple answer to the question is yes. Pick the version of ADO you
want to use and ignore MDAC.

A more detailed and really boring answer follows. [You can easily and
safely exit here.]

When ADO was introduced and for most of its history it was supported
by a team separate from the development or system groups. It had
separate release cycles from any other product. Products that shipped
with MDAC, included whatever current version was available and could
be later updated with subsequent MDAC releases.

The MDAC was the keystone of what Microsoft called "Universal Access",
the idea of a single assortment of tools providing access to any data
source through a single access library. ODBC had gone a long way to
providing this sort of functionality, but ODBC was tied to a single
hierarchical data model - ADO and OLE DB removed this limitation.

To implement this grand strategy MS adopted its other rising star -
COM - that's where and why OLE is so much a major player.

A major point of confusion is that while MDAC releases were/are named
after the most current version of ADO (the ActiveX Data Objects) they
supported - the MDAC is actually a package of diverse though related
components - the principle catagories being OLE 'system' support, OLE
DB components and OLE DB Providers, and the ADO data access library.
(These packages originally also included ISAM and ODBC drivers, and
the DAO data access library, ie - one-stop shopping for all data
access.)

The strategy was grand and ambitious. Perhaps too ambitious as
problems appeared almost immediately in trying to keep such a diverse
asssortment of tools all current (and provide bug fixes and upgrades)
in a single package. Or perhaps it was mostly marketing and MS never
really expected it to be all that Universal in the first place.

One problem was the ADO data access libraries, the second was the
improvement and fixes of the OLE/OLE DB components. While ADO itself
is essentially non-system dependent, OLE is totally system dependent,
and OLE DB was product dependent as well as having a foot in both ADO
and OLE.

It would take too long to document all the various changes to the
MDAC package in its migration from a 'universal' store house to a
'specific' ADO/OLE tool, and such information is
readily available on the web, but to highlight a few ...

The ADO libraries improved in features and needed bug fixes the
fastest . (Probably why MDAC releases were named after ADO versions.)
To manage this MS adopted the strategy to provide a single named
component that supplied multiple interfaces. This simplified four
things:
1) With each new ADO release MS simply provided a new interface to the
existing component,
2) Each version had many features in common with previous versions.
Keeping them in the same component meant they only had to have one set
of code for all,
3) as bug fixes and improvements often affected more that one version
of ADO they could provide those fixes at a single point,
4) they avoided having multiple versions laying around - one file
replaced the old.
Each new release provides support for all previous versions of ADO.

Stop and think what the packages might have looked like if MS hadn't
adopted this strategy. We could have had ...
msado15.dll
msado2.dll
msado2b.dll
msado25.dll
msado25b.dll
msado25c.dll
msado25d.dll
msado26.dll
msado26b.dll
msado26c.dll
msado27.dll
msado27b.dll
msado28.dll
msado28b.dll
...
If having multiple interfaces for one component confused developers
just imagine what a mess the above would have been.

The same problems existed for the OLE components and MS adopted the
same strategy. For different O/Ss (and the OLE components) MS simply
provided separate MDAC packages. That's why there is a different one
for Win2000 and below and another one for XP. (Both labeled '2.8' by
the way.)

For partly political reasons (MS announced the death of DAO several
times and really wanted to push migration to SQL server) and simply
because the under-lying technology and dependences were so different,
DAO, ISAM, and ODBC was removed from the MDAC. Those components are
supplied in separate JET packages.

The MDAC has confused and caused doubt for years for otherwise
competent developers (Mr. Toews's article an excellent example), and
for absolutely NO reason. A zillion bytes have been wasted when the
rule has ALWAYS been very simple and valid from Day One. Pick the
version of ADO you want to use. If a client doesn't have the
components to support that version then have them download or supply
the latest 'n greatest MDAC package - NO MATTER WHAT VERSION OF ADO
YOU ARE USING.

In general, previous to Vista, every client and developer has always
been advised to download the most current MDAC package appropriate for
their system. Not necessarily to support a higher version of ADO but
to take advantage of improvements and fixes for both ADO and OLE.
Again - NO MATTER WHAT VERSION OF ADO A PARTICULAR PRODUCT IS USING.

A developer can also take it as a general rule to develop against ADO
2.5. This is because
1) after all this time it is the most stable,
2) the most clients already have it no matter what platform they are
using, and
3) 2.5 provides the bulk of the features a developer
commonly uses.
But this really has little to do with MDAC, except obviously the
client has to have an MDAC installed that has the components to
supports the version of ADO a program uses. But if everyone simply
installs the latest 'n greatest - then it was not, is not, nor should
it ever be, a problem. [there were a few issues with 2.6, thus the
subsquent quick release of 2.7 and 2.7rtm, followed by their equally
quick demise with the release of 2.8.]

IMHO If a developer knows his targets are XP and above then should use
ADO 2.8, but the advantage is only additonal features (which as
already noted you likely won't need but nice to have if you do. <g>)
and by now it is equally stable.

And last - all of this is becoming a non-issue since MS now includes
ADO and OLE/OLE DB as part of Vista and Win7 supplied components (and
updated by SPs and not from a separate 'universal' package). MDAC is
gone. So pick any version of ADO you want* it will be supported.

MS also now supply OLE DB providers as separate downloads. OLE DB and
OLE is likely to remain a platform supported feature.

Whew!
-ralph

[* I don't advise picking anything previous to 2.5 as there are
differences in behavior and not all the bugs have been fixed.]

MM

unread,
Nov 26, 2010, 7:10:16 AM11/26/10
to
On Fri, 26 Nov 2010 03:41:42 -0600, ralph <nt_cons...@yahoo.net>
wrote:

[snip]

>[* I don't advise picking anything previous to 2.5 as there are
>differences in behavior and not all the bugs have been fixed.]

Thanks for all that! Very interesting. Yesterday, after reading the
feedback and before reading your current post I switched from
Microsoft ActiveX Data Objects 2.1 Library to Microsoft ActiveX Data
Objects 2.5 Library, which struck me as a happy medium. I'm not
planning on releasing the app for W2K because I want to again use
registration-free COM with a manifest file. So this will mean XP and
following.

MM

Tony Toews

unread,
Nov 28, 2010, 5:04:00 PM11/28/10
to
On Fri, 26 Nov 2010 03:41:42 -0600, ralph <nt_cons...@yahoo.net>
wrote:

>A more detailed and really boring answer follows. [You can easily and
>safely exit here.]

A very interesting summary of the history ADO snipped. As I stayed
in the Access world I stayed with DAO and never did much with ADO so
this is greatly appreciated.

>In general, previous to Vista, every client and developer has always
>been advised to download the most current MDAC package appropriate for
>their system. Not necessarily to support a higher version of ADO but
>to take advantage of improvements and fixes for both ADO and OLE.
>Again - NO MATTER WHAT VERSION OF ADO A PARTICULAR PRODUCT IS USING.

Now that I understand how ADO works I would just stick with the base
version of ADO that came with the lowest targeted OS and is updated by
the OS. Unless a new version had an required feature. But then I
avoid doing any installs which require admin priviliges.

Although now that I reread the above paragraph I see you stated "has
always been advised..." which doesn't mean you agree with that advice.
<smile>

>A developer can also take it as a general rule to develop against ADO
>2.5. This is because
>1) after all this time it is the most stable,
>2) the most clients already have it no matter what platform they are
>using, and
>3) 2.5 provides the bulk of the features a developer
>commonly uses.

And ADO 2.5 is present on Windows 2000 and all newer Windows OSs.
And I'm assuming no one these days is targeting older OSs given that
MS no longer provides security patches.

>IMHO If a developer knows his targets are XP and above then should use
>ADO 2.8,

Agreed given that 2.8 comes with the OS.

>Whew!

Whew is right!

0 new messages