After deletion of a record, the record index's are reassigned. They are
always maintained 1 - nRecords.  Try always passing index=0  to
DmRemoveRecord() or delete the entire database and recreate it.

-Ken

> ----------
> From:         Low Pui Kuen[SMTP:[EMAIL PROTECTED]]
> Reply To:     Palm Developer Forum
> Sent:         Monday, January 28, 2002 9:13 AM
> To:   Palm Developer Forum
> Subject:      Problem with removing all the records at a time
> 
> Hi,
> 
> I want my function to perform a deletion of all records at a time but 
> instead it only deletes half of the records.
> Anybody has experienced this before?
> 
> //In the SetupMod.c
> UInt16 i = 0;
>   .
>   .
>   .
> case cmdModDel :
> 
> for(i = 0; i < CountRecord(); i++)
>     RemoveModule(i);
> /////////////////////////////////
> 
> 
> 
> //In the NPET_database.c
> void RemoveModule(UInt16 index)
> {
> 
>       Err err = OpenDB();
>          if (err)
>               return err;
> 
> return DmRemoveRecord(dbPtr,index);
> }
> /////////////////////////////////////
> 
> 
> Thanks in advance.
> 
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> 

-- 
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