Ok, thanks for the feedback on my data read routine. This is my data
create routine. I have a memory leak somewhere and I'm suspecting my
table handling routines. (for a reason that I'll ask about later in an
unrelated problem, I can't run a debug rom.)
void CreateMyData( void ){
MemPtr recP;
MemHandle recH;
UInt16 index;
mydataDB DataArea;
UInt16 pos = dmMaxRecordIndex;
UInt8 n;
for (n=0; n<19; n++){
index = 0;
recH = DmNewRecord(gDB, &index, sizeof(mydataDB));
// and lots of data additions here like:
switch (n){
case 0:
StrCopy( DataArea.SOMEFIELD, "somedata");
break
etc...
}
if (recH){
recP = MemHandleLock(recH);
DmWrite(recP, 0, &DataArea, sizeof(mydataDB));
MemPtrUnlock(recP);
MemHandleUnlock(recH);
}
DmReleaseRecord(gDB, index, true);
}
}
Phil Barnett
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/