I made a mistake in the traduction of variable names in the second sample 
code where

memH = DmGetRecord (dbP, indice);

should be

memH = DmGetRecord (dbP, index);


Eduardo Orea.


"Eduardo Orea" <[EMAIL PROTECTED]> escribió en el mensaje 
news:[EMAIL PROTECTED]
>I hope this helps.
>
> For read-only use DmQueryRecord()
>
> RecordStruct getRecord ( UInt16 index )
> {
> MemHandle memH;
> MemPtr memP;
> RecordStruct record;
> memH = (MemHandle) DmQueryRecord (dbP, index);
> memP = MemHandleLock (memH);
> MemMove (&record, ((RecordStruct*)memP), sizeof(RecordStruct));
> MemHandleUnlock (memH);
> return record;
> }
>
>
> For read-write or overwrite use DmGetRecord() and DmReleaseRecord().
>
> void setRecord ( RecordStruct record, UInt16 index )
> {
> MemHandle memH;
> MemPtr memP;
> memH = DmGetRecord (dbP, indice);
> memP = MemHandleLock (memH);
> DmWrite (memP, 0, &record, sizeof(RecordStruct));
> MemHandleUnlock (memH);
> DmReleaseRecord(dbP, index, true);
> }
>
>
> Good Luck.
>
> Eduardo Orea.
>
>



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to