In article <53573@palm-dev-forum>, "Danny Epstein"
<[EMAIL PROTECTED]> wrote:
> Here's a fixed version of your code (untested, without error checks, etc):
>
> newH = DmNewHandle(CrewResDB, sizeof(ResultType));
> p = MemHandleLock(newH);
> error = DmWrite(p, index, &Result, sizeof(Result) );
> MemHandleUnlock(newH);
> oldH = DmQueryRecord(CrewResDB, CurrResRecord);
> index = CurrResRecord;
> DmAttachRecord(CrewResDB, &index, newH, &oldH);
> MemHandleFree(oldH); // now contains the replaced record
> --
> Danny
Shouldn't DmGetRecord and DmReleaseRecord be called, when writing to a
record, to update the dirty bit, modification date and modification
number?
--
Remo Hofer <[EMAIL PROTECTED]>
http://www.geocities.com/SiliconValley/Cable/5206/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/