---> initialH = DmNewRecord(gDB, &recIndex, recSize);

upon a succesful return the recindex points to the record index actually
being asigned by the data manager. setting this to dmMaxRecordIndex wud
leasd to creating the record at he end.


> in the code below, i am just initializing 2 different boolean variables
into the memory (trying to at least).
> do i just increment the recIndex by 1? (ie recIndex++) or does DmNewRecord
take care of creating different memory allocations.  I'm just worried that
the second DmSet() will overwrite the first one, and not place it in a
different spot.
>
> //initialH = true
> initialH = DmNewRecord(gDB, &recIndex, recSize);
> if (initialH)
> { recP = MemHandleLock(initialH);
> DmSet(recP,0,true, 1);
> MemHandleUnlock(initialH);
> DmReleaseRecord(gDB, recIndex, true);}
>
> //recIndex++; ??????
>
> //authenticatedH = false
> authenticatedH = DmNewRecord(gDB, &recIndex, recSize);
> if (authenticatedH)
> { recP = MemHandleLock(authenticatedH);
> DmSet(recP,0,false, 1);
> MemHandleUnlock(authenticatedH);
> DmReleaseRecord(gDB, recIndex, true);}
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>

----- Original Message ----- 
From: "Mishael Kim" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Monday, April 18, 2005 3:12 PM
Subject: storing 2 different database records


> in the code below, i am just initializing 2 different boolean variables
into the memory (trying to at least).
> do i just increment the recIndex by 1? (ie recIndex++) or does DmNewRecord
take care of creating different memory allocations.  I'm just worried that
the second DmSet() will overwrite the first one, and not place it in a
different spot.
>
> //initialH = true
> initialH = DmNewRecord(gDB, &recIndex, recSize);
> if (initialH)
> { recP = MemHandleLock(initialH);
> DmSet(recP,0,true, 1);
> MemHandleUnlock(initialH);
> DmReleaseRecord(gDB, recIndex, true);}
>
> //recIndex++; ??????
>
> //authenticatedH = false
> authenticatedH = DmNewRecord(gDB, &recIndex, recSize);
> if (authenticatedH)
> { recP = MemHandleLock(authenticatedH);
> DmSet(recP,0,false, 1);
> MemHandleUnlock(authenticatedH);
> DmReleaseRecord(gDB, recIndex, true);}
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
>




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to