Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I find out the names of the ODBC data sources available through the JDBC-ODBC driver?

0
Posted

How can I find out the names of the ODBC data sources available through the JDBC-ODBC driver?

0

Location: http://www.jguru.com/faq/view.jsp?EID=94778 Created: Jul 5, 2000 Modified: 2000-07-05 07:29:28.011 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) There is no Pure Java mechanism to get this information. If you don’t mind locking yourself into the Microsoft VM, the following program demonstrates: import com.ms.wfc.app.*; public class ODBCSource { public static void main(String args[]) { RegistryKey regKey = Registry.CURRENT_USER.getSubKey (“Software\\ODBC\\ODBC.INI\\ODBC Data Sources”); if (regKey != null) { String dsn[] = regKey.getValueNames(); for(int i = 0; i < dsn.length; i++) { System.out.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123