Your last argument in DmNewRecord needs to besizeof(DATATEST).  I have no
idea why you are passing in the sizeof a pointer.


----- Original Message -----
From: "Brandon Sean Fogerty" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, March 06, 2003 10:23 PM
Subject: Re: Error With Adding a Record to a Database


> Even so,  I changed it to
>
>
>
> LocalID id=DmFindDatabase(0,"Testdb");
> DmOpenRef dbRef=DmOpenDatabase(0,id,dmModeWrite);
> UInt16 Index=dmMaxRecordIndex;
> DATATEST Score;
> //score.text="BrandonFogerty";
> Score.score=10;
> MemHandle handle=DmNewRecord(dbRef,&Index,sizeof(&Index));
> void* recPtr=MemHandleLock(handle);
> DmWrite(&recPtr,0,&Score,sizeof(DATATEST));
> MemPtrUnlock(recPtr);
>
> and I get an error in the runtime that says
> DmWrite: DmWriteCheck Failed
>
>           What should I do to fix it?
> Thanks!
>
>
> Brandon
> Lead Programmer/Graphics/Music
> [EMAIL PROTECTED]
> Http://www.DreamCodersRealm.com
> We Write Tomorrow's Code!
>            GOD Bless you Always my Friend!!!!!!
>
> --
> 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