VBA to check for existence of a DSN

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

XL 2000
Can anyone point me to a bit of VBA that checks a user's PC for the
existence of a DSN?

Cheers

GPO
 
You'll need to look in these three places.

file DSN's,
%ProgramFiles%\Common Files\ODBC\Data Sources

system DSN's
You'll need to get the subkey with the DSN names
HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

and also the subkey for each DSN
HKLM\SOFTWARE\ODBC\ODBC.INI\

Also look for user DSN's in;

HKCU\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

and also the subkey for each DSN
HKCU\SOFTWARE\ODBC\ODBC.INI\

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| XL 2000
| Can anyone point me to a bit of VBA that checks a user's PC for the
| existence of a DSN?
|
| Cheers
|
| GPO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top