Hello,
    maybe VFSFileDelete fails, because you the file is still open. Files get
closed on application exit.
So check if you don't accidentaly leave the file open. You could override
VFSFileOpen and VFSFileClose with macros to your custom functions and then
put breakpoints there to see if every file gets closed.
(If testing on simulator or emulator also make sure that the file is not
open in a windows application).

Regards,
    Miro Pomsar

----- Original Message ----- 
From: "Les Brinkworth" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Thursday, April 14, 2005 16:34
Subject: 2ND POST!! Delete file problem - VFSFileDelete


> I have built a function into my app to save a database to an external card
when the app is closed using VFSExportDatabaseToFile.
>
> The first problem I had is that if the file has already been saved it
gives an error instead of overwriting the existing file. My work-around was
to delete the file if I get the error using VFSFileDelete and then use
VFSExportDatabaseToFile to save the file.
>
> The problem I get is that I still get the same error. This tells me that
the app thinks the file is still there. I have added a function to
re-enumerate the vol after deleting the file but this also didn't help.
>
> If I close the app re-open it and close again it saves the DB.
>
> Software Versions:
> Codewarrior Dev Studio for Palm OS V9.2
> Zire 72 & Zire 72s
> Palm OS V5.2.8
> 30Mb Multimedia Card
>
> PLEASE CAN SOMEONE ASSIST!!
>
> Thanks
>
> Les Brinkworth
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to