Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: ResultSet is closed

843854Jan 26 2002 — edited Feb 5 2002
hi all,

I'm using jdk 1.4.0 rc, and an Access XP Database

I make a typical connection with the DB. All seems to go right.
Then I send a SQL "SELECT IdBancoXML, FichXML, NombreBanco FROM BancosXML", and try to retrieve the results using a normal ResultSet:

Statement sentencia = AccesoABD.conexion.createStatement();
ResultSet rs = sentencia.executeQuery(SelectSQL);

This ResultSet retrieves the first record of the DB, but when it makes de second rs.next(), it fails, throwing the following Exception:

java.sql.SQLException: ResultSet is closed
at sun.jdbc.odbc.JdbcOdbcResultSet.checkOpen(JdbcOdbcResultSet.java:6455)
at sun.jdbc.odbc.JdbcOdbcResultSet.next(JdbcOdbcResultSet.java:1233)
at AccesoABD.BancosXML.<init>(BancosXML.java:44)
at AccesoABD.AccesoABD.main(AccesoABD.java:97)

Any have seen this happen before? The API Docs didn't tell anything about closed ResultSets...

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2002
Added on Jan 26 2002
7 comments
1,905 views