SQLite JDBC driver and CachedRowSet

105 views
Skip to first unread message

ann.w...@gmail.com

unread,
May 12, 2017, 7:14:55 AM5/12/17
to Xerial
Hi,

I'm trying to compile and run the oracle JDBC example with SQLite:
It is prepared to use Derby or MySql and I'm trying do a setup it with SQLite.

I was able to create database, tables, content and connect to database with Xerial SQLite JDBC Driver.
I can query it with ResultSet but the examples based on RowSet throws:

java.sql.SQLException: not implemented by SQLite JDBC driver
        at com.sun.rowset.internal.CachedRowSetReader.readData(Unknown Source)
        at com.sun.rowset.CachedRowSetImpl.execute(Unknown Source)
        at com.sun.rowset.CachedRowSetImpl.execute(Unknown Source)
        at com.oracle.tutorial.jdbc.CachedRowSetSample.testPaging(CachedRowSetSample.java:100)
        at com.oracle.tutorial.jdbc.CachedRowSetSample.main(CachedRowSetSample.java:273)

from execute():

      crs = new CachedRowSetImpl();
      crs.setUsername(settings.userName);
      crs.setPassword(settings.password);
      crs.setCommand("select * from MERCH_INVENTORY");
      crs.setPageSize(100);
      crs.execute();

My question: is it possible to use RowSet with Xerial SQLite JDBC Driver or it is not implemented?

Regards,
Annie

 



ann.w...@gmail.com

unread,
May 12, 2017, 9:35:05 AM5/12/17
to Xerial
additional info, such call throws exception:

      CachedRowSet crs = new CachedRowSetImpl();
      crs.setCommand("select * from person");
      crs.execute(connection);

but this one works ok:

      statement = connection.createStatement();
      ResultSet rs = statement.executeQuery("select * from person");
      CachedRowSet crs = new CachedRowSetImpl();
      crs.populate(rs);

why???

 
Reply all
Reply to author
Forward
0 new messages