"chirag chauhan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I am adding new record to the database using following steps:
>
> DmNewHandle
> MemHandleLock
> PackRecord
> MemHandleUnlock
> DmAttachRecord
> DmRecordInfo
> DmSetRecordInfo
>
> On the first iteration of adding new record works fine.
> But On second iteration of adding new record, the record is added
successfully but also changes the first record with the second one.
>
> Like, I have added first record say P.
> And then adding second record say Q then my database records looks
like Q(P becomes Q now) and Q.
>
> Am I missing anything?? Pls reply me ASAP.
> Thanks in advance.
>
> Regards,
> CChauhan.
>
You don't provide any code so we don't see what you are doing wrong.
In general:
// use dmMaxRecordIndex to add to end of database
// or DmNumRecordsInCategory(dbP, dmAllCategories) to add to end of
active records
index = <where you want the record to go>;
err = DmAttachRecord(dbP, &index, newDbRecH, NULL);
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/