"[SQLITE_ERROR] SQL error or missing database (near ".": syntax error)" when using "dot commands"
Are "dot commands" supported? I haven't been able to make them work with either of the statement.execute-types.
query.executeUpdate("create table "+tablename+" (name string, id integer);"); query.executeUpdate(".separator '\t'"); query.executeUpdate(".import "+path+" "+tablename); ResultSet rs = query.executeQuery("select count(*) from "+tablename); System.out.println(rs.getInt(1));
Especially the .import would be useful. The code crashes at the first line with a ".anything" (as far as I've tried the list from http://www.sqlite.org/sqlite.html), whether it is executeUpdate or just execute. (Even tried executeQuery, just in case.)
Error-dump for execute:
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near ".": syntax error) at org.sqlite.DB.newSQLException(DB.java:383) at org.sqlite.DB.newSQLException(DB.java:387) at org.sqlite.DB.throwex(DB.java:374) at org.sqlite.NativeDB.prepare(Native Method) at org.sqlite.DB.prepare(DB.java:123) at org.sqlite.Stmt.execute(Stmt.java:113)
Error-dump for executeUpdate:
java.sql.SQLException: near ".": syntax error at org.sqlite.NativeDB.throwex(NativeDB.java:210) at org.sqlite.NativeDB._exec(Native Method) at org.sqlite.Stmt.executeUpdate(Stmt.java:152)
As I am new to both SQLite and the JDBC, this might not be an issue at all. However, after some hours of searching I figured I'd just ask.