"dhanushka jayakody" <[EMAIL PROTECTED]> wrote
> "MemoryMgrNew.c line..... invalid handle"
>
> recHandle = DmQueryRecord(gDB,currentRecord);
> myRec = MemHandleLock(recHandle);
>
This function is documented as returning NULL if the record
doesn't exist. Defensive coding rules would lay the code out
like this:
recHandle = DmQueryRecord(gDB,currentRecord);
if (recHandle)
myRec = MemHandleLock(recHandle);
else
(handle the error or missing record)
> Why does it give me a invalid handle when the record
> is there in the database(i debug the program..)
>
Are you saying that recHandle is NULL when the record exists
or that recHandle is non-NULL but MHL says that it's invalid?
These are both possible from your description but have quite
different possible causes.
Chris Tutty
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/