Click to See Complete Forum and Search --> : ado version
doctrin13th
Mar 29th, 2009, 04:00 AM
what are the differences of ADO versions?
what is the most reliable? i mean the standard?
Hack
Mar 29th, 2009, 08:10 AM
Moved To General Developer
si_the_geek
Mar 29th, 2009, 09:39 AM
I would recommend 2.7 or higher.
From 2.7 onwards you are unlikely to notice any differences, and they are all reliable.
doctrin13th
Mar 30th, 2009, 06:45 AM
I've read the tutorial of Beacon. He used version 2.5 as an example so I assumed that it's the standard and most reliable. But he also added "(2.5 is just a version you can use whatever version you have)"
But I wondered what is the difference of using different versions? Are there any specific uses of a certain version?
si_the_geek
Mar 30th, 2009, 07:02 AM
Beacon's tutorial is quite old (and has been replaced by this one), and there have been several versions of ADO released since then - I'm pretty sure that 2.7 was released over 5 years ago.
I can't remember what the differences are, because after 2.7 there aren't any (or at least none worth worrying about). Ones before 2.7 have noticeable differences (in terms of not having features that 2.7+ have got), so are not recommended.
dilettante
Mar 30th, 2009, 08:19 AM
Beginning with MDAC 2.1, ADO releases are versioned differently than most other COM libraries ever have been.
On any system with MDAC 2.5 or later installed, you will find a series of type libraries with names like:
Microsoft Activex Data Objects 2.0 Library
Microsoft Activex Data Objects 2.1 Library
Microsoft Activex Data Objects 2.5 Library
... and so on.
For the version of MDAC actually installed you will find the DLL itself which is always named msado15.dll but will be titled for its interface version, e.g.:
Microsoft Activex Data Objects 2.8 Library
What this means is that you should compile your program for the ADO feature set it requires. If you need the features in ADO 2.5 then use a reference to that interface. If you need features in 2.7 choose that.
The type libraries will map all of these to the actual msado15.dll that is installed on the target system using the interfaces (classes, enums, etc.) of the "ADO version" you compiled for.
It is incorrect to suggest that your programs should not be compiled using a reference to ADO 2.5. For example on Vista which has DAC 6.0 (MDAC is no more) and thus ADO 6.0 a program compiled against an ADO 2.5 typelib will actually use the ADO 6.0 version of msado15.dll (the only version, there can only be one at a time). So a program compiled against ADO 2.5 will benefit from all of the fixes offered by newer MDAC versions without any change.
The only downside is that using a downlevel typelib means your program doesn't have access to newer features.
A clear example of that can be seen by choosing ADO 2.1 and then examining it via the VB6 IDE's Object Browser. You'll find there is no Record or Stream class exposed to your program even though you're using a newer version of msado15.dll.
If you use SQL Server versions after 2000 you may want to pay close attention to the version you choose. ADO 2.6 added named parameters and 2.7 added some "newer SQL Server" specific features and fixes.
Another big caution is to avoid late binding to ADOX ("Microsoft ADO Ext. x.y for DDL and Security" or msadox.dll). ADOX does not have the benefit of those typelibs ADO has. If you compile against a reference to ADOX 2.7 (probably what you have if you have WinXP) your programs will not work on Windows Vista, Win 2008 Server, Windows 7, Win 2010 Server, or future OSs. Those newer OSs all have ADOX 6.0 and no other version is present or can be installed.
DAC 6.0 was designed to prevent faulty setup packages from trying to overwrite MDAC components, which have been considered part of the OS and off-limits to application installers for years. MDAC/DAC are only supposed to be updated via OS Service Packs, Windows Update, and other OS updates.
This doesn't apply if you are trying to support very old versions of Windows (Win2K before SP2, NT 4.0, any Win9x).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.