From: <[EMAIL PROTECTED]>
Subject: How to update a specified field in the database
> Can someone give me some direction on updated a specific field in the
database
> for a giving field position, data to be written to the record, and the
record
> handle? I already know how to write data to the database record by
record, but
> I sometimes need to update just some specified field(s) in the record.
Thanks.
>From Neil Rhodes' book (available online at
http://www.palmos.com/dev/tech/docs/devguide/ch06.htm#P218_13516):
VoidHand myRecord = DmGetRecord(gDB, recordNumber);
StructType *s = MemHandleLock(myRecord);
DmWrite(s, offsetof(StructType, field), &newValue, sizeof(newValue));
MemHandleUnlock(myRecord);
DmReleaseRecord(gDB, recordNumber, true);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/