Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find Data Source Names?

Status
Not open for further replies.

crao

Programmer
Sep 18, 2001
2
US
Hi,
I need to find the DSNs(Data Source Names) registered in my system. And I need to figure out the driver type(say Oracle,MS Access,MS SQLServer,..) of each DSN.
I need to do it with Java. pls help me.
thanks in advance,
Rao
 

32-bit ODBC information is stored in the registry. Check the following keys.

System Data Sources:
HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources

User Data Sources:
HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources

File DSNs can also be used. The following registry key points to the location of the file DSNs. The files are structured like INI files.

HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC File DSN

It appears that ODBC Data Source information, with the exception of file DSNs, is currently stored in the ODBC.INI file in the [ODBC 32 bit Data Sources] section. I'm not certain if DSN info will be stored in the INI file as well as the registry with future releases of ODBC. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top