It ain't SQLite keeping your file open.
Make sure the connection is closed properly (Typically calling the Close
command from your wrapper for SQLite) and then it should be free. Make
sure there is no other program with lingering connections to it, a
different project maybe, or a different instance of your project, or
perhaps a database manager program used alongside your project, of y our
IDE linking to the DB with its own DB inspection facility... or last but
not least, an anti-virus program holding a lock to "check" the file
didn't become a virus after it has been written to.
You can inspect the exact file handles on Windows with some command-line
tools too, but I'm willing to bet it's one of the above situations.
Cheers!
Ryan
On 2017/06/28 11:37 AM, Domonic Tom wrote:
After calling sqlite3_close(handle) I try then to use the 'remove' method in
C++ to delete my .db file. For some reason it just won't delete.
It's hard to show you the whole project because it's large.
I believe this has something to do with sqlite3_close only de-allocating the
connection to the database.
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.
There's a few hints round the web mentioning Garbage Collection, and deleting
the query but I don't understand how to do either.
Any help would be appreciated.
Thanks
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users