BDB SQL API: Creating Virtual table using Java
Hi
I am new to using BDB SQL API (and Sqlite). I am using BDB 5.1.19, Solaris 10, SunStudio12 compiler. Compiled using "-DSQLITE_ENABLE_RTREE".
I am successfully able to create/query virtual table using command-line tool sqlite3.
However, when I am trying to create a virtual table based on the Java code sample at ../build_unix/jdbc/test3.java I am not successful.
I CAN create/populate/query regular table. However, when I try to create a virtual table I get this -
SQLite.Exception: SQL logic error or missing database at SQLite.Stmt.step(Native Method)
.....
Here is the code excerpt -
do_exec(db, "CREATE VIRTUAL TABLE rtree_index USING rtree(id,minX, maxX,minY, maxY);");
private void do_exec(SQLite.Database db, String sql) throws SQLite.Exception
{
Stmt stmt = db.prepare(sql);
while (stmt.step())
{
}
stmt.close();
}
Thanks for any hints.