Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

BDB SQL API: Creating Virtual table using Java

Rupesh-OracleOct 20 2010 — edited Oct 27 2010
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.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 24 2010
Added on Oct 20 2010
5 comments
539 views