I would like to create a record and then write some data in it. I don't get an
error during compiling, but during program execution.
error: just wrote to a memory location 0x.... which is storage heap. In oreder
to protect integrity of the user's data, such direct access is not allowed.
How should i write the data to a record then?
code:
typedef struct
{
char time[15];
char temperature[5];
char comment[20];
} DBRecordType;
newRecordH=DmNewRecord(gTempDB,&index,sizeof(newRecord));
newRecordP=(DBRecordType*)MemHandleLock(newRecordH);
StrCopy(newRecordP->time,"test");
DmWrite(newRecordP,0,&newRecord,sizeof(newRecord));
MemHandleUnlock(newRecordH);
DmReleaseRecord(gTempDB,index,true);
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/