> 
> I'm not sure where you close your database handle, and what you mean by 'end 
> of
> a run', but when you have used sqlite3_close() to close all handles to a 
> SQLite
> database that file should no longer exist.  If you still have a file with 
> that name on
> your disk, something has gone wrong, and you should figure out why.  Can you
> make absolutely sure sqlite3_close() has been called correctly and does not 
> return
> an error ?

My apologies for my lack of clarity.  What I mean by "end of a run" is simply 
when I exit InDesign (and all plugins attached thereto).

I close the database frequently--at the end of the module where it is opened.

The documentation says that when I close a database transactions in progress 
are rolled back, but I cannot find a way of testing for whether a transaction 
is completed.  Is that the role of the finalize call?

Here's the sequence of events I use when I use sqlite3_close:

Result = sqlite3_step(ResultStmt);
if(Result != SQLITE_DONE)
{
Do some error/loop stuff as appropriate
}

sqlite3_finalize(ResultStmt);
sqlite3_close(db_ptr);
sqlite3_shutdown();

If there is a better/safer method, please let me know.

R,
John
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to