When you open the database, scan thru the records & check their attributes.
Get a count of the deleted records, which you can subtract from the actual
number of records, so that you know how many are actually 'good' records.

If all the deleted records are at the end of the database, you should be
able to figure out where the last good record is...

This is the approach I use.



on 8/31/01 3:54, Mattias Nyl�n at [EMAIL PROTECTED] wrote:

> How do I find out if a record is deleted? In my app I have implemented a
> delete functionality that deletes the record and places it last in the
> database. (According to O-Reillys book 'Palm programming').
> 
> It seems to work fine. However, when I retreive records from the database
> (when creating lists, tables), it picks up also the deleted records. Since
> the deleted records doesn't seem to be holding all the info they would need,
> my app crasches when they come across these deleted records.
> 
> The Palm OS companion .pdf says that good practice is "Not to show deleted
> records". How do I do this?
> 
> /Mattias
> 
> 


-Tom Hoelscher

~~~~~~~~~~~~~~~~~~~~~~~~~~
"Original Sin is hard to find, but the digitally enhanced version is readily
available".


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

Reply via email to