Hello,
Actually the regular JdbcRowSet, essentially a connected result set, seems to
work fine. The CachedRowSet also works fine for a query, but when a
acceptChange()
is applied back to the database table the following error occurs.
SQLException: Column "NAME" not found; SQL statement:
INSERT INTO KEY_TABLES.PUBLIC."key_table5" (name, color, price) VALUES (?,
?, ?) [42122-175]
SQLState: null
VendorError: 0
org.h2.jdbc.JdbcSQLException: Column "NAME" not found; SQL statement:
INSERT INTO KEY_TABLES.PUBLIC."key_table5" (name, color, price) VALUES (?,
?, ?) [42122-175]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
at org.h2.message.DbException.get(DbException.java:172)
at org.h2.message.DbException.get(DbException.java:149)
at org.h2.table.Table.getColumn(Table.java:626)
at org.h2.command.Parser.parseColumn(Parser.java:826)
at org.h2.command.Parser.parseColumnList(Parser.java:811)
at org.h2.command.Parser.parseInsert(Parser.java:1004)
at org.h2.command.Parser.parsePrepared(Parser.java:394)
at org.h2.command.Parser.parse(Parser.java:298)
at org.h2.command.Parser.parse(Parser.java:270)
at org.h2.command.Parser.prepareCommand(Parser.java:235)
at org.h2.engine.Session.prepareLocal(Session.java:436)
at org.h2.engine.Session.prepareCommand(Session.java:379)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138)
at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:70)
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:267)
at com.sun.rowset.internal.CachedRowSetWriter.writeData(Unknown Source)
at com.sun.rowset.CachedRowSetImpl.acceptChanges(Unknown Source)
at com.sun.rowset.CachedRowSetImpl.acceptChanges(Unknown Source)
at
com.dandymadeproductions.dbtofilememorydb.DB_To_FileMemoryDB.executeCachedJDBCRowSet(DB_To_FileMemoryDBPanel.java:831)
*** 831 - cachedRowSet.acceptChanges(dbConnection);
The columns in the table are defined in lowercase so without being quoted
in the insert
there is an error. Offhand I would say this seems to be an issue with the
CachedRowSetWriter
and perhaps can be overidden by a local implemenating class.
I have included H2 as an library to the MyJSQLView desktop application and
have chosen
it to be one of the database options for creating local file/memory tables
for analysis.
It has been a pleasure to include H2 as a supported database by
MyJSQLView. I have found
its workings to be quite SQL compliant and easy to work with.