View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Patrick Dave Patrick is offline
external usenet poster
 
Posts: 249
Default VBA to check for existence of a DSN

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

"GPO" wrote:
| 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