Since Metadata.getGeneratedKeys() seems to be really available also for
prepared statements (with the multi-threaded caveat, of course), I
suggest to apply this patch so that it's easier to use cross-database
code that supports SQLiteJDBC too and not to error out when not needed:
--- src/org/sqlite/Conn.java.orig 2009-07-22 17:30:10.000000000 +0200
+++ src/org/sqlite/Conn.java 2009-07-22 17:30:20.000000000 +0200
@@ -214,7 +214,10 @@
ResultSet.CONCUR_READ_ONLY);
}
public PreparedStatement prepareStatement(String sql, int autoC)
- throws SQLException { throw new SQLException("NYI"); }
+ throws SQLException {
+ return prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY,
+ ResultSet.CONCUR_READ_ONLY);
+ }
public PreparedStatement prepareStatement(String sql, int[] colInds)
throws SQLException { throw new SQLException("NYI"); }
public PreparedStatement prepareStatement(String sql, String[]
colNames)
--
Lapo Luchini - http://lapo.it/
“The best way to predict the future is to implement it.” (David
Heinemeier Hansson)
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [email protected]
-~----------~----~----~----~------~----~------~--~---