Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

List available data sources on a local & a network PC  RSS feed

 
Josh Hogan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to build an application for database administrators using java. I am unable to figure out a way to list all installed data sources in the local machine as well as on a network computer. I want the end user to be able to double click the data source and view the database schema. Any ideas? I would really appreciate the help.

Josh
 
Jan Cumps
Bartender
Posts: 2628
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Josh.

How would you search for these installed datasources?
 
Rob Spoor
Sheriff
Posts: 20940
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They're configured in the Windows registry: HKLM\SOFTWARE\OBDC\ODBC.INI\ODBC Data Sources for system DSNs, likewise but in HKCU for user DSNs. The value names are the DSN names.
As for network PCs, you'll need to access the remote registry for that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!