JDBC-ODBC Connection

ravi_elite235's Avatar, Join Date: Dec 2007
Newbie Member
can anyone know the answer for this question?
Connection con = DriverManager.getConnection ( 
"jdbc:odbc:wombat", "login", "password"); 
Statement stmt = con.createStatement(); 
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM Table1"); 
while (rs.next()) { 
Integer x = rs.getInt("c"); 
String s = rs.getString("a"); 
Float f = rs.getFloat("b"); 
What is WRONG with the code above?
Choice 1
Retrieval of the fields is in the wrong order.
Choice 2
The password must be encrypted before being sent to the DriverManager.
Choice 3
The Driver's URL is in the wrong format.
Choice 4
The ResultSet class returns primitive types for integers and floats.
Choice 5
The SQL statement is invalid.

Last edited by shabbir; 6Dec2007 at 17:23.. Reason: Code block
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
I see choice 4 as all the other option are not applicable.