|
As anyone who has tried to ship MDAC (Microsoft Data Access Components) with their application will know, it’s NOT as easy task! This page is a few tips I’ve gathered together that will help in the distribution.
A lot of the information I’ve detailed here can be found despersed around Microsoft’s Data site: http://www.microsoft.com/data/.
1. When do I need MDAC?
I can’t speak for any language other than Visual C++ 6 and 7, but any VC program that uses ADO, DAO, or another standard MS way of accessing databases will need it. In simple terms, MDAC is a set of DLLs that allows your application to talk to the database. Without them, your program will likely say there is some kind of database error when you try connecting.
2. But there’s loads of versions, which do I need?
MDAC installation is pretty much a minefield, and the version you need to ship depends greatly on your target OS. There are three main versions of MDAC:
- MDAC 2.5 - Released in Feb 2000 and should be the earliest edition you think of shipping.
- MDAC 2.6 - Shipped with Windows 2000 (meaning if your target is purely Win2k, you don’t have to ship it). This edition offers the best middle ground between the older 2.5 and the latest 2.7. This edition does have requirements though, which are an important consideration.
- MDAC 2.7 - Shipped with Windows XP. This edition currently has no service packs, meaning MS haven’t (yet) found anything wrong with it. This version doesn’t support Win95 at all. It also has some requirements for Win98 first edition and Windows NT 4.
Still no nearer to knowing which version you need? From my experience of Visual C++ 7 apps, I find MDAC 2.6 is the best choice. I’ve yet to have any problems with 2.6 that would necessitate me updating to 2.7.
I’d recommend being extremely careful on servers running Ms SQL Server. There are issues with MDAC and SQL server to do with versioning. MDAC can ‘rollback’ (uninstall itself, and reinstall the previous version) should anything very bad happen. I can’t offer any advice on SQL Server installations, as I work with client machine installations.
3. Great, so where do I get the file I need to ship?
You can download a separate .exe file that your users can install by hand when they install your software. All versions of MDAC have the same naming convention: mdac_typ.exe. These files can be found on the downloads page of Microsoft’s Data site: http://www.microsoft.com/data/download.htm
This won’t offer a smooth single-step installation for users however. This was a big problem until recently, when Microsoft released an MDAC merge module. If you have an setup creator such as Wise, InstallShield, MS Installer and the like, you will be able to insert the merge module into the setup project, and MDAC will automatically be installed when your program is. This merge module can be downloaded from here. Note, this is MDAC version 2.7.
Note. I’ve found a minor issue in this merge module, meaning it will have problems installing on Windows 98 machines. See the next section.
4. But the MDAC merge module won’t work on Windows 9x installations
This is because the merge module has certain requirements field set that don’t seem to work quite right on Windows 98. Even though MDAC 2.7 has no requirements for Windows 98 SE (my test OS) it still refused to install.
There is an accompanying white paper with the merge module above describing how to rebuild the merge module with another version of MDAC. This requires having Orca, a small merge module editing utility that comes with the Microsoft Platform SDK.
I re-inserted MDAC 2.6 and hacked out the requirement that meant the installation would fail on Windows 98. I’ve filled in a comment on the MS page, but to my knowledge the merge hasn’t been updated, hence I will make my hacked merge module available if anyone has the same problems I’ve faced.
A few points first:
- I don’t own the copyright for this, Microsoft does. I’m distributing it because I believe I can legally distribute it with my software.
- This merge module has no requirement checks for NT4, meaning it will try installing MDAC even if the requirements of SP5 aren’t met. This could cause serious problems with NT.
- If this module screws up your client’s entire office, you can’t blame me.
- Installing MDAC 2.6 on Windows XP (which will probably downgrade MDAC from 2.7) may cause issues with other software. I recommend making an installation with MDAC for <XP machines, and one without MDAC for XP.
Here the file is: MDAC 2.6 Merge Module with no OS check (5.3MB)
Finally, the best advice I can give is test-test-test. No one can test their software for every possible eventuality, but customers won’t be happy if they can’t even install it!
Why not support Calcaria.Net and buy a photographic print?
|