-
Bug
-
Resolution: Fixed
-
P1
-
1.2.0
-
1.2.1
-
x86
-
windows_nt
-
Verified
Name: clC74495 Date: 02/18/99
Carlos.Lucasius@Canada (February 18, 1999): This bug was filed by Inprise
with priority 1. I asked them for justification of this ultra-critical priority
level, and here is their reply:
Carlos,
Our justification:
- Critical functionality of the bridge just plain doesn't work
- Our customers use this functionality all the time
- We are preparing our next major release of JBuilder and need
it to work
that's why.
John Bailey
Original Bug Report follows:
In JDK 1.2 the JdbcOdbc bridge cannot re-execute prepared statements.
This is critical since this is the whole point of prepared statements.
If you look at the source code for JdbcOdbcStatement.getResultSet() you
will see that this bug will occur for any ODBC driver used with the
bridge.
Note that this bug was not present in JDK 1.1.
In the JDK 1.2 that we have the following statements will encounter a
SQLException
java.sql.Connection con = db.getJdbcConnection();
java.sql.PreparedStatement statement =
con.prepareStatement("select * from customer");
java.sql.ResultSet result = statement.executeQuery();
result.close();
statement.executeQuery(); // SQLException fires here.
Here is the stack trace for the SQLException:
java.sql.SQLException: Invalid state for getResultSet
at
sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:253)
at
sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(JdbcOdbcPreparedStatement.java:106)
at com.inprise.jbtest.dataset.Bugs2.prepareTest(Bugs2.java:112)
at com.inprise.jbtest.dataset.Bugs2.runTest(Bugs2.java:33)
at com.inprise.jbtest.harness.TestManager.runTests(Compiled
Code)
at com.inprise.jbtest.datastore.qa.main(Compiled Code)
(Review ID: 54310)
======================================================================