Thanks for the help. I eventually figured this out given the points above.
I simply output the open address and close address of each database I opened
and closed to see if something wasn't being closed.
It turned out to be a far more simple problem in the end. A silly one at
that.
I was
The database file I am trying to delete is in use when I try to delete it, so
it's obviously still open.
This is what I've done.
I have made my connection to the database (sqlite3 *handle) global.
If this is the case then just before I delete the file I could close the
connection
Woops, I spoke too soon. Still can't delete the file.
I don't have any prepared statements, just simple sqlite3_open_v2 and
sqlite3_close statements. But, something along the lines of what you are
saying could be the issue.
I'm checking it out now.
--
View this message in context:
-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of
Richard Hipp <d...@sqlite.org>
Sent: Wednesday, 28 June 2017 7:55 PM
To: SQLite mailing list
Subject: Re: [sqlite] Cannot delete a Database file?
On 6/28/17, Domonic Tom <abdom...@hotmail.com> wrote:
>
> Wou
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
Thanks Simon.
I solved the issue by making sqlite3 *dbhandle = NULL then testing it for a
null value afterwards. It works fine.
From: sqlite-users on behalf of
Simon Slavin
Sent:
Is there a way to test whether the DB_handle used when opening a database is
good?
I need to find some way of testing it to make sure it represents the live
connection to a database?
Is that possible?
Thanks
___
sqlite-users mailing list
Would anyone know how to get the table names from a specific database in C++ or
just using the C API for sqlite?
I have tried the below but I get nothing. Thought I might be able to move the
list of names into a table but it doesn't seem to want to work. Clearly I
can't do this using sql..
8 matches
Mail list logo