Actually, the system does not close the database during a soft reset. So
says Insider on the 3.0a3 POSE running a Palm III debug rom.
The database is still, in fact, open, and cannot be deleted as such.
My still-unanswered question is how to delete a database in this state.
This, I presume, requires either 1) recovering a DmOpenRef in order to call
DmCloseDatabase(), or modifying the database header directly. I would like
to know if there is a Palm-approved way to accomplish this.
oge
> -----Original Message-----
> From: George Madrid [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, December 03, 1999 14:38
> To: [EMAIL PROTECTED]
> Subject: Re: cleaning up a database that's open
>
> Two things:
>
> First, it's real easy. The system will clean up for you when it soft
> resets. So, you don't have to do anything. It's analogous to your
> desktop
> system crashing when you have a file open. The system takes care of
> cleaning up the mess and the file is no longer open.
>
> Second, the DmOpenRef is not something that you can "recover". It is like
> a
> FILE* - it's housekeeping. You can't recover something that's not there
> anymore.
>
> The practical upshot of this is that you don't need to worry too much
> about
> this situation. During development, you can just reset the database back
> to
> some known state and keep going. And your production code ain't gonna
> crash, right? :-)
>
> You should try to make sure that you always leave the db in some
> reasonable
> state - write stuff atomically, cache as little as you can get away with,
> etc. That way you can survive when the user presses the reset button in
> the
> middle of your app.
>
> Good luck,
>
> George
>
>