I am attempting to read a record from a db using DmGetRecord.
All I am doing is reading the data from the database, and then attempting to
free the necessary memory so that I really didn't do anything, still in
testing phase.
After running through the code its seem to work the first time, however, the
following all cause this error:
running the code again
clicking on the app, info menu.
trying to sync (conduit in use which is attempting to communicate with the
db)
Here is the error:
MemoryMgr.c, Line:4384, Free handle A soft reset is needed here.
I am obviously missing something. Please help.
Here is the code:
static void foo(FormType *frmP)
{
FrmSetTitle(frmP, "Test");
Err error;
MemHandle recH;
char* test;
LocalID dbId = DmFindDatabase(cardNo, "barDB");
gDatabase = DmOpenDatabase(cardNo, dbId, dmModeReadOnly);
recH = DmGetRecord(gDatabase, 0);
if(recH) {
test = (char*) MemHandleLock(recH);
MemHandleUnlock(recH);
}
MemHandleFree(recH);
DmReleaseRecord(gDatabase, 0, false);
error = DmCloseDatabase(gDatabase);
}
}
tia,
Steve K
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/