ODBC & ADO installation

Hi!

What is the safest/ most reliant way to find out if ODBC 3.5, ADO and Access Driver is installed on a computer?
I know that if I install MDAC I will get all that, but they could be there without MDAC installed and I don't want to install MDAC if I don't have to.
So, which are the keys I should read i registry to find out these three things?
(There are so many ODBC-things in the registry I don't know which one I should rely on.)
Thanks!
ScattanAsked:
Who is Participating?
 
AssafgoConnect With a Mentor Commented:
First, it doesn't hurt to install MDAC, it actually fixed bugs in odbc 3.7 for SQL Server in my case.
Second, all the information you need can be viewed easily from Control Panel->Odbc Data Sources.
There you can find which Odbc drivers are installed, which versions, and what dll's are they using.
All administration can be done from there.
0
 
ScattanAuthor Commented:
Thank you Assafgo, but I'm writing an installation program and cannot go to the control panel etc. to see which installations the computer that the program will be installed on has, I need to do it programmatically.
That's why I don't want to install MDAC if I don't have to, or promt the user to do it if the installation program cannot find the required software.
So do you have any tips on which registry keys I can check for instead?

Thanks!
0
 
AssafgoCommented:
In this case - simple.
The installed odbc drivers are written in the odbcinst.ini in the windows folder.
If you want to get their versions (it's not there, only the names), then go to the registry for
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers
and there you can find what's installed.
under each subkey of HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI you may also find the details (version, etc..)
Good luck
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
ScattanAuthor Commented:
Thanks!

And what about ADO?
0
 
AssafgoCommented:
ADO is actually an ActiveX component.
To find if it exists, you can use programming methods (QueryInterface...)
The problem is that there are many interfaces to ADO, as you can see in the registry keys under
HKEY_CLASSES_ROOT such as
HKEY_CLASSES_ROOT\ADOConnectObject.ADOConnectObject and anything else that starts with the name ADO.

another way I think will suffice is to check that the file Msadodc.ocx exists
(and you can know the version that way also)
0
 
ScattanAuthor Commented:
OK, thats not the best answer, but its good enough, thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.