On Fri, Oct 4, 2013 at 10:07 AM, Simon <turne...@gmail.com> wrote: > > 3) I call sqlite3_create_module() with module name "vtable1" > > 4) I call sqlite3_declare_vtab() with this statement: "CREATE TABLE foo ( x > integer, y integer );" >
The application must never invoke sqlite3_declare_vtab(). The sqlite3_declare_vtab() interface can only be called from within the xCreate and xConnect methods of the virtual table implementation. If called from any other context, sqlite3_declare_vtab() returns the error you describe. When you run "CREATE VIRTUAL TABLE name USING module;" the xCreate method is called to create the new virtual table. The xCreate method needs to tell the SQLite core what the schema for the virtual table is and it uses sqlite3_declare_vtab() to do so. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users