Re: [sqlite] Delete a database file

2004-02-26 Thread ben . carlyle
- 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]



Re: [sqlite] Delete a database file

2004-02-26 Thread Christian Smith
On Thu, 26 Feb 2004, Benoit Gantaume wrote:

>Hi,
>Here is my pb:
>
>I just want to suppress a database file.

When you say suppress, do you mean you only want a temporary database?

If so, use the filename ":memory:" when opening the database, and you'll
get a memory only database which will go away when you finish.


>
>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.

You use sqlite_close?

>
>The only way to be able to remove the file is to close the process that
>used the database...
>
>Do you have some tip?
>
>Thx
>
>Regards
>
>  __
> Benoit Gantaume
>  Dmailer vous facilite la gestion de l'information.
>  Phone :
>  Fax :
>  Email : +33 (0) 4 91 29 32 81
>  +33 (0) 4 91 76 39 27
>  [EMAIL PROTECTED]
>
>
>DISCLAIMER:
>
>
>The integrity of this message cannot be guaranteed on the Internet. Dmailer cannot 
>therefore be held responsible for the contents of this e-mail.
>This e-mail may contain proprietary information some or all of which may be legally 
>privileged. It is for the intended recipient only.
>If an addressing or transmission error has misdirected this e-mail, please notify the 
>author by replying to this e-mail.
>If you are not the intended recipient you must not use, disclose, distribute, copy, 
>print, or rely on this e-mail.
>Any views expressed in this message are those of the individual sender, except where 
>the sender specifically states them to be the views of Dmailer
>
>
>Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention 
>exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est 
>interdite.
>Tout message électronique est susceptible d'altération. Dmailer décline toute 
>responsabilité au titre de ce message s'il a été altéré, déformé, falsifié ou encore 
>diffusé sans autorisation.
>

-- 
"The problem with the French is that they don't have a word for entrepreneur"
  George W. Bush

--
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \

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



[sqlite] Delete a database file

2004-02-26 Thread Benoit Gantaume



Hi,
Here is my pb: 
 
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?
 
Thx
 
Regards
 


  
  
__
  

Benoit GantaumeDmailer vous 
  facilite la gestion de l’information.
  
Phone :Fax :Email :
+33 (0) 4 91 29 32 81+33 (0) 4 91 76 39 27[EMAIL PROTECTED]
DISCLAIMER:The integrity 
of this message cannot be guaranteed on the Internet. Dmailer cannot therefore 
be held responsible for the contents of this e-mail. This e-mail may contain 
proprietary information some or all of which may be legally privileged. It is 
for the intended recipient only. If an addressing or transmission error has 
misdirected this e-mail, please notify the author by replying to this e-mail. 
If you are not the intended recipient you must not use, disclose, 
distribute, copy, print, or rely on this e-mail. Any views expressed in this 
message are those of the individual sender, except where the sender specifically 
states them to be the views of Dmailer Ce message et toutes les 
pièces jointes sont confidentiels et établis à l’intention exclusive de ses 
destinataires. Toute utilisation ou diffusion non 
autorisée est interdite. Tout message 
électronique est susceptible d’altération. Dmailer décline toute responsabilité 
au titre de ce message s’il a été altéré, déformé, falsifié ou encore diffusé 
sans autorisation.