Hi!  I am trying to add a record to a database.  my code compiles fine
 however, I keep getting Memory NULL Handle runtime errors on my palm.
 This is what I did
 
struct DATATEST
 {
         UInt16 score;
 };
         DmCreateDatabase(0,"Testdb",1,1,false);
                 LocalID id=DmFindDatabase(0,"Testdb");
                 DmOpenRef dbRef=DmOpenDatabase(0,id,dmModeReadOnly);
                 UInt16 Index=dmMaxRecordIndex;
                 DATATEST Score;
                 //score.text="BrandonFogerty";
                 Score.score=10;
                 MemHandle handle=DmNewRecord(dbRef,&Index,200);
                 void* recPtr=MemHandleLock(handle);
                 DmWrite(recPtr,0,&Score,sizeof(DATATEST));
                 MemPtrUnlock(recPtr);
                 FrmAlert(SaveAlert);
 Any ideas?  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/

Reply via email to