R
Rich
All,
I'm working on a piece of code to allow the user to select from a list
of JDBC/ODBC data sources. For example, assume I have four Access ODBC
data sources. How do I enumerate these?
After a lot of searching on Google, I found the following:
/////////////////////////////////////////////////////////////////////////
Enumeration enum = DriverManager.getDrivers();
System.out.println(" Before - while (enum.hasMoreElements())");
while (enum.hasMoreElements())
{
System.out.println("Has Driver");
System.out.println(enum.nextElement().toString());
}
System.out.println(" After - while (enum.hasMoreElements())");
/////////////////////////////////////////////////////////////////////////
However, it does not return anything. Does the JDBC/ODBC bridge need
to be configured? I am missing something here?
Thanks,
RB
I'm working on a piece of code to allow the user to select from a list
of JDBC/ODBC data sources. For example, assume I have four Access ODBC
data sources. How do I enumerate these?
After a lot of searching on Google, I found the following:
/////////////////////////////////////////////////////////////////////////
Enumeration enum = DriverManager.getDrivers();
System.out.println(" Before - while (enum.hasMoreElements())");
while (enum.hasMoreElements())
{
System.out.println("Has Driver");
System.out.println(enum.nextElement().toString());
}
System.out.println(" After - while (enum.hasMoreElements())");
/////////////////////////////////////////////////////////////////////////
However, it does not return anything. Does the JDBC/ODBC bridge need
to be configured? I am missing something here?
Thanks,
RB