When you call DmDeleteRecord, you only delete the record data, not the
record header. The header will be deleted after an HS.
If you want to remove permanetly a record, call DmRemoveRecord instead.
So you cannot call DmDeleteRecord twice with the same index.
Ludovic
Sebastian from Berlin/Germany wrote:
> Hey,
>
> i have a so calles "trascan"-database, where i store deleted record for a later
>recovery. I want to
> limit its size to 100 record (0-99) by deleting the oldest records and therefore
>implemented the
> following code, that gives me an error (DataMgr. - Err Deleting rec)
>
> ----
>
> //limit trashcan-size to 100 records
>
> trashcandbref = DmOpenDatabase (DB_CARDNO, trashcan_id , dmModeWrite);
>
> for(;(DmNumRecordsInCategory(trashcandbref,dmAllCategories)-1)>99;)
> {
> DmDeleteRecord (trashcandbref, 0); //here the error occure
> }
> DmCloseDatabase(trashcandbref);
>
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/