| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> JDBC driver Bug
Hi,
I just discovered a very strange bug in the 9i JDBC drivers.
See the following code:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
DriverManager.setLogWriter(new java.io.PrintWriter(System.out, true));
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@demo:1521:ora8",
"faaj", "partners");
conn.setAutoCommit(false);
PreparedStatement stmt = conn.prepareStatement("SELECT
PRIORITY \"PRIORITY\", seq \"SEQ\" frOM todo WHERE seq = 363 FOR
UPDATE", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery();
rs.next();
rs.updateLong("PRIORITY", (long) 1);
rs.updateRow();
the rs.updateRow() throws an java.sql.SQLException: ORA-00904: invalid column name
If I remove the dummy PRIORITY column alias from the select statement it works fine....
Oracle has put a nice motto in their SQL reserved words appendix:
The words I use are everyday words and yet are not the same!
They appear applicable to me in this case too!
Regards,
Frido Received on Thu Jan 10 2002 - 05:23:48 CST
![]() |
![]() |