[RESOLVED] MS ActiveX Data Objects version?
I was lookiong at my VB6 app references and noticed that there is a "Microsoft ActiveX Data Objects 6.0 Library". I'm currently using "2.8", is "6.0" a newer version and should I use it. It seems strange to go from 2.8 to 6.0. There is also a "Microsoft ActiveX Data Objects Recordset 6.0 Library" reference. I'm confused, does it have to do with "VS 2005 .NET"?
any information will be appreciated, thanks
Re: MS ActiveX Data Objects version?
Yes, 6 is a newer version that is included with Vista by default but you shoud be able to download from MS.
It went from 2.8 to 6.0
Re: MS ActiveX Data Objects version?
Rob,
Thanks, this is a Vista machine. Should I use 6.0 even though this app will be running on Vista and Non Vista machine?
Re: MS ActiveX Data Objects version?
I havent read the requirements on 6.0 but it may mess up XP
I did find this but it doesnt say much about 6
http://msdn.microsoft.com/en-us/libr...06(VS.85).aspx
Re: MS ActiveX Data Objects version?
Rob,
Thanks for the reply and link. I think I'll stick with 2.8 since there was no functional gains listed.
Thanks again, I'll mark this resolved.
Re: [RESOLVED] MS ActiveX Data Objects version?
No prob. :)
2.8 does install and run fine on Vista
Re: [RESOLVED] MS ActiveX Data Objects version?
MDAC 2.8 will not install into Vista though it may let you think it did.
You cannot download 6.0 for installation in a pre-6.0 version of Windows (Vista is Windows 6.0).
Beginning with about SP2 of Windows 2000 MDAC became a part of Windows, not an optional installable item. At that time updates to MDAC were really Windows updates.
Beginning with MDAC 2.5 a new strategy started in an attmpt to relieve a bit of DLL Hell. The newest ADO on your system is always named msado15.dll, which is not ADO 1.5 but instead it is the newest version (and only version) installed.
In order for old programs compiled referencing earlier MDAC releases to keep running, a series of typelibs is installed. You get one for ADO 2.0, one for ADO 2.1, one for ADO 2.5, etc. (up to the newset MDAC installed). All of these TLBs point to msado15.dll and each has the subset of class IDs supported in the MDAC release it matches.
So if you have MDAC 2.8 installed in Windows XP your program can be compiled against the ADO 2.5 typelib and it will work. However it actually uses msado15.dll which is the MDAC 2.8 version but is limited to the interfaces supported by the MDAC 2.5 version of ADO. I.e. your program cannot use features that were new in ADO 2.6, 2.7, or 2.8 even though it is really using the ADO 2.8 library.
Windows 2000 introduced System File Protection to keep rogue installers from trashing critical system files. This became more mature in Windows XP Gold, and still more mature in Windows XP SP2. At this point it covers (protects) MDAC components as well, and they can never be replaced except through a Windows Update MSI as long as SFP is turned on.
With the release of Vista SFP was renamed Windows File Protection, was made even more robust, covers many more system files... and cannot be turned off at all in Vista itself.
Vista also changed a very late MDAC 2.8 and renamed it Windows DAC 6.0 to emphasize that it is part of Windows, not something for users to muck about with and try to install over. Typelibs are included covering ADO 2.0, 2.1, 2.5, 2.6, 2.7, and 2.8 interfaces so old programs still work.
WFP is so robust now that if you try to install MDAC 2.8 into Vista it just chuckles to itself, lets you think something installed, and ignores the whole thing. By MDAC 2.8 the whole package was tailored to each Windows OS anyway, and since there is no MDAC 2.8 for Vista it couldn't be expected to work anyway.
ADOR was folded in the same way. There is no longer an ADOR 2.0 or 2.1 library, just typelibs pointing into msado15.dll.
ADOX must be treated as a special case.
For some reason ADOX was never moved to this new versioning system based on external typelibs. If you develop a program on XP that uses ADOX you might have been tempted to set a reference to ADOX 2.6 since that's the only typelib VB can locate. DO NOT DO THIS.
In Vista there is no ADOX 2.6, and no "redirection typelib" to allow your program to match intefaces with Vista's ADOX 6.0! Instead you need to use late binding with ADOX, or else sacrifice portability to Windows 2000 and Vista. If a Win9x system has MDAC 2.5 or later installed late bound programs should work there too, but since anything older than Win2K SP4 is now unsupported Microsoft doesn't care one way or the other.
Some of this is covered in The MDAC 2.5 Stack and Windows File Protection and Windows Data Access Components SDK Overview.
A little more is covered in How To Develop with ADO Version 2.5 or Later and Install on ADO Version 2.0 and other KB articles.
What to do then?
For greatest portability set a reference to ADO 2.5 in VB6 unless you need features introduced in ADO 2.6 or later. These include named parameters (ADO 2.6) and some things specfic to late versions of SQL Server. If using ADOX always late-bind to it in versions compiled for production or distribution (though early binding to whichever version you have can be useful during development).
Since most programmers never use anything later than the ADO 2.5 feature set they can almost always target ADO 2.5 and have wide portability with no loss of functionality. Your program will still benefit from the security and bug fixes of later MDAC releases because you won't actually be using ADO 2.5 unless you run on an MDAC 2.5 system.
There is still an MDAC 2.8 SP1 redist for older (pre-SP2) Windows 2000 though if you need it there.
Re: [RESOLVED] MS ActiveX Data Objects version?
INFO: Maintaining Binary Compatibility in Components with ADOR talks a little about what ADOR used to be. Now you get only typelibs pointing into ADO, to let old ADOR programs continue to run.
Vista's ADOR 6.0 might work fine or might prove as problematic as ADOX is now though for early-bound programs. I'm not sure. Basically nobody uses ADOR anymore because it stopped being meaningful when MDAC 2.5 came out.
Re: [RESOLVED] MS ActiveX Data Objects version?
Dilettante,
All I can say is thanks and WOW thats a great explaination. If I understand correctly your saying if the app runs correctly with ADO 2.5 then use that reference because it will give you the best portability.
Since thats the version I used when I developed this app that is great info to have.
Thanks
Re: [RESOLVED] MS ActiveX Data Objects version?
Quote:
MDAC 2.8 will not install into Vista though it may let you think it did.
What do you have to validate the statement? (curious as I have VB 6 installed with serveral ADO versions).