get data file path from ODBC DSN

supmktg

Registered User.
Local time
Today, 16:58
Joined
Mar 25, 2002
Messages
360
I am trying to extract the data file path from an ODBC System DSN via code. I can view the DSN info in the registry, it is located at:
HKEY_ LOCAL_ MACHINE\Software\ODBC\ODBC.INI\
and has the name "DSNOne".

I have code to extract the info I want from the file. This code works for a File DSN, which is located at: C:\Program Files\Common Files\ODBC\Data Sources\DSNTwo.dsn.

When I try running the code using the path:
HKEY_ LOCAL_ MACHINE\Software\ODBC\ODBC.INI\DSNOne.dsn
I get an error 76 Path Not Found.
What is the proper path? Where are the System DSN files actually located, and how can I get to, open, and read them?

I appreciate any help I can get with this!

Thanks,
Sup
 

Users who are viewing this thread

Back
Top Bottom