On 6/28/17, Domonic Tom <[email protected]> wrote:
>
> Would anyone know how to go about making sure that the database file is not
> busy and can be deleted.  Is there a specific function for this.
>

Call sqlite3_finalize() on all prepared statements before calling
sqlite3_close().  Probably you are leaking prepare statements - in
other words there are one or more prepared statements that you have
failed to call sqlite3_finalize() for.

Consider adding the "stmts" virtual table to your project
(https://www.sqlite.org/src/file/ext/misc/stmts.c) and then run the
query "SELECT sql FROM stmts" and print out the results just prior to
calling sqlite3_close().  That will clearly show you which prepared
statements you have forgotten to finalize.
-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to