Hi there,
You may be able to use the Version property of a Connection object:
Code:
Dim connTest As ADODB.Connection
Set connTest = New ADODB.Connection
MsgBox (connTest.Version)
Even when the application references version 2.1, this will return 2.7 (on my system).
It's not fool proof and you'll need ugly
On Error Resume Next statements to catch systems that don't have ADO installed at all but it might just be enough for your purposes.
Alternatively, you could write code that checks versions of DLLs or does a registry lookup. I am not sure where exactly the information is stored, but you could search the registry for the GUIDs of ADO objects:
00000206-0000-0010-8000-00AA006D2EA4 (2.6)
EF53050B-882E-4776-B643-EDA472E8E3F2 (2.7)
If you're lucky, this may help you to find some more clues about the version information stored in the registry.
HtH
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.