This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Resultset Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Resultset Exception" Watch "Resultset Exception" New topic
Author

Resultset Exception

asit dhal
Greenhorn

Joined: May 05, 2009
Posts: 13

Just go through the following code...



Can somebody tell me the reason the following exception in the above code ??

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
at Main.main(Main.java:49)


http://kodeyard.blogspot.com/
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

You seem to be connecting to Oracle using ODBC driver. Stop doing that, use the Oracle's JDBC driver (the JdbcOdbcDriver's documentation itself says you should use target database's JDBC driver if available). I'd be only a bit surprised if this resolves your error.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resultset Exception
 
Similar Threads
HSQLDB - user lacks privilege or object not found
no dafault driver specified
error when i run the program
jdbc connect Access
Update inside Select statement