Perhaps because you don't close the database after you do the DmWrite, then
try to open the database again?

----------
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://HandAble.com

----- Original Message -----
From: "Johl J Kennedy" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 2:50 PM
Subject: I am sorry to ask this but why is this happening


> I have been following all the emails on this and I have done the same as
in
> the email and I still am writing to low mem.
> I know the DB is created so that is not the problem.  I know it works fine
> all the way down to DmWrite.  Anyone that could shed some light on this,
the
> help would be greatly appreciated.  Ok new question as I run for the 100th
> time studying the code.  It seems to run once, it should be able to run 10
> time storing 10 times in the db right? Well it seems to me like the error
> comes after it has be run once.  Why would the code not work more then
once?
>
> this is the error when it is run more then one time.
> the error is app just read from memory location 0x00000006, which is in
low
> memory.
>
> then when I continue the error
>
> "SysFatalAlert with message: "memoryMgr.c,line 4365,NULL handle"
>
> Line 4365 takes me to the end of PilotMain
>
>
>
>
>
> case  ctlSelectEvent:
>           if (event->data.ctlEnter.controlID ==  MainSaveButton)
>              {
>                struct MyRecord{
>       UInt16 data;
>       };
>       DmOpenRef dbRef;
>       UInt mode;
>       mode = dmModeReadWrite;
>
>       dbRef=DmOpenDatabaseByTypeCreator(DBTYPE, CREATORID, mode);
>       UInt16 at= dmMaxRecordIndex;
>       MemHandle h = DmNewRecord(dbRef,&at,sizeof(MyRecord));
>
>       MyRecord *rec = (MyRecord*)MemHandleLock(h);
>       MyRecord TempRecord;
>       TempRecord.data = 10;
>       DmWrite(rec,0,&TempRecord,sizeof(TempRecord));
>       MemHandleUnlock(h);
>       DmReleaseRecord( dbRef, at, true );
>
>     }
>
> Thank you for any help you might be able to offer.
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


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

Reply via email to