Dennis Cote wrote:

Taj,

I'm not sure what wrapper you are using, but the sqlite.dll provided by
SQLite has two API functions that are used to open and close the database
connection. You use sqlite3_open() to open the connection, and
sqlite3_close() to close it. Between these two calls you can execute as many
queries as you want, either using sqlite3_exec() or the
sqlite3_prepare()/sqlite3_step()/sqlite3_finalize() APIs.


Dennis,
I've done some testing and the wrapper and it appears that TEMPORARY TABLEs don't stick around between sqlite_exec's :(. (I'm using SQLite 2.8.15, and thus not using the sqlite3_* functions, because the TSQLite wrapper uses the SQLite 2). I'm not really sure what's going on... It appears that the Query function just calles sqlite_exec. If I do this:
DB.SQL:='CREATE TEMPORARY TABLE cname2cid(id INTEGER,name VARCHAR(512))';
DB.ExecSQL;


DB.SQL does this:
...
SQLite_Exec(fSQLite, PChar(Sql), @ExecCallback, Self, fPMsg);
...

Other queries don't know about cname2cid...even the command line doesn't know about it. Of course, if I CREATE TEMPORARY TABLE from the commandline, then queries from anywhere (either from the wraper/DLL or the command line)...

Any ideas?

Thanks for the help,
--
Taj

Reply via email to