This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes List available data sources on a local & a network PC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "List available data sources on a local & a network PC" Watch "List available data sources on a local & a network PC" New topic
Author

List available data sources on a local & a network PC

Josh Hogan
Greenhorn

Joined: Sep 10, 2010
Posts: 1
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

Joined: Dec 20, 2006
Posts: 2476
    
    7

Welcome to JavaRanch, Josh.

How would you search for these installed datasources?

OCUP UML fundamental and ITIL foundation
youtube channel
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: List available data sources on a local & a network PC
 
Similar Threads
How to make a binary tree in JSP?
Spring Basic IOC concepts
retrive data from oracle database using struts
How to know programmatically whether a machne is in Global/Private network ?
how connect with database using hyper link