"Have you checked if DmSyncDatabase() helps at all?"
Yes, I have and it didn't see to work. But, as I mentioned earlier, if I make a
copy of each record and then delete the original record right before closing
the database, then this problem is gone. Of course I'm not sure if this is a
guarantee.
A code sample woule be like this:
n = DmNumRecords(dbRef);
for (i = 0; i < n; i++) {
hOldRec = DmQueryRecord(dbRef);
pOldRec = MemHandleLock(hOldRec);
size = MemHandleSize(hOldRec);
newPos = i + 1;
hNewRec = DmNewRecord(dbRef, &newPos , size);
pNewRec = MemHandleLock(hNewRec);
DmWrite(pNewRec, 0, pOldRec, size);
MemHandleUnlock(hOldRec);
MemHandleUnlock(hNewRec);
DmReleaseRecord(dbRef, newPos, true);
DmRemoveRecord(dbRef, i);
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/