----- Forwarded by Ben Carlyle/AU/IRSA/Rail on 27/02/2004 09:54 AM -----

Ben Carlyle
27/02/2004 09:34 AM


        To:     "Benoit Gantaume" <[EMAIL PROTECTED]>@CORP
        cc: 
        Subject:        Re: [sqlite] Delete a database file

Benoit,





"Benoit Gantaume" <[EMAIL PROTECTED]>
26/02/2004 08:45 PM

 
        To:     <[EMAIL PROTECTED]>
        cc: 
        Subject:        [sqlite] Delete a database file


> I just want to suppress a database file.
> But it's impossible to do it from the procees that created or opened the 
database even if i closed it!
> I guess that I do not close properly the database.
> The only way to be able to remove the file is to close the process that 
used the database...
> Do you have some tip?

Under unix, just unlink it. The file will actually be deleted when your 
process closes it. Under Windows, you can't delete any open file of any 
kind, ever. You have to close the file, first. If you issue sqlite_close 
calls for each sqlite* pointer you recieved from sqlite_open the file will 
be closed.

But the question is, why do you want to close the file? Just to free up 
some space? Why are you using an on-disk database when you could use an 
in-memory database?

Benjamin.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to