Hello,
storing the LocalID seems to be the fastest solution, but is probably a
big NoNo on NVFS devices as localID is not guaranteed
to remain the same. The safe way would be to store the names (but would be
slow, as locating a database is a linear search.)
With best regards,
Miro Pomsar
----- Original Message -----
From: "John Sutton" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Thursday, June 23, 2005 15:19
Subject: RE: Deleting databases during their enumeration
Hi Vesselin,
I can only think of one more option, not sure if it's that practical
but...
How about mark the relevant databases as recyclable and reset the device
on completion?
Regards
John Sutton
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dr. Vesselin
Bontchev
Sent: 23 June 2005 14:06
To: Palm Developer Forum
Subject: Deleting databases during their enumeration
Hello folks,
My application enumerates all databases in the main memory of the
device, using a DmGetNextDatabaseByTypeCreator loop. Each database found
is examined and, if it meets certain criteria, is deleted.
Problem is, deleting (or creating, for that matter) a database screws up
the DmGetNextDatabaseByTypeCreator loop. There are two obvious solutions
to this:
1) Collect the IDs of the databases that should be deleted and delete
them after the DmGetNextDatabaseByTypeCreator loop completes.
2) Restart the search loop every time a database is deleted.
Are there any more clever solutions to this? Fiddling with the
DmSearchState structure, perhaps? Or something else?
Regards,
Vesselin
--
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/