#2028 SQLite and Fantom

seanmcginty Thu 20 Sep 2012

Anyone have any luck using SQLite JDBC with Fantom? I can query data just fine, but when I try to do anything that changes the database (insert, delete, etc.) I get the following error: sql::SqlErr: not implemented by SQLite JDBC driver.

The exact same code executed in Java over the same database doesn't have a problem.

The fact that I can query the database means the JDBC driver is being found and the database file is found. The Java test proves that the JDBC driver does in fact implement the functions I'm trying.

Is there something special about Fantom under the covers that I'm missing?

Thanks

Sean

brian Thu 20 Sep 2012

What is the stack trace - there must be some specific method used by Fantom which your Java code is not calling

seanmcginty Thu 20 Sep 2012

Here's the stack trace:

sql::SqlErr: not implemented by SQLite JDBC driver

sql::SqlConnPeer.err (SqlConnPeer.java:179)
sql::StatementPeer.execute (StatementPeer.java:226)
sql::Statement.execute (Statement.fan)
sql::Statement.execute (Statement.fan)
db::DbObjTests.setup (DbObjTests.fan:21)
java.lang.reflect.Method.invoke (Method.java:597)
fan.sys.Method.invoke (Method.java:559)
fan.sys.Method$MethodFunc.callList (Method.java:204)
fan.sys.Method.callList (Method.java:138)
fanx.tools.Fant.runTest (Fant.java:190)
fanx.tools.Fant.test (Fant.java:110)
fanx.tools.Fant.test (Fant.java:32)
fanx.tools.Fant.run (Fant.java:284)
fanx.tools.Fant.main (Fant.java:327)

Cause:

sys::Err: java.sql.SQLException: not implemented by SQLite JDBC driver
  org.sqlite.Unused.unused (Unused.java:29)
  org.sqlite.Unused.executeUpdate (Unused.java:42)
  sql::StatementPeer.execute (StatementPeer.java:215)
  sql::Statement.execute (Statement.fan)
  sql::Statement.execute (Statement.fan)
  db::DbObjTests.setup (DbObjTests.fan:21)
  java.lang.reflect.Method.invoke (Method.java:597)
  fan.sys.Method.invoke (Method.java:559)
  fan.sys.Method$MethodFunc.callList (Method.java:204)
  fan.sys.Method.callList (Method.java:138)
  fanx.tools.Fant.runTest (Fant.java:190)
  fanx.tools.Fant.test (Fant.java:110)
  fanx.tools.Fant.test (Fant.java:32)
  fanx.tools.Fant.run (Fant.java:284)
  fanx.tools.Fant.main (Fant.java:327)

brian Thu 20 Sep 2012

Not supporting JDBC executeUpdate seems like its missing some really core functionality

go4 Fri 21 Sep 2012

I have fork a sql at here. And it's Sqlite and H2 compatible.

Login or Signup to reply.