I believe resetting the device compacts the memory. Its possible you are
trying to resize and there isn't a block large enough to handle the memory
request.
-----Original Message-----
From: Hamish McGovern <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, May 25, 1999 8:47 PM
Subject: MemHandleResize failing 257 (memErrNotEnoughSpace)
>Hi all,
>
>I'm getting MemHandleResize returning memErrorNotEnoughSpace (257)
>for some records in my database.
>
> I've got the following piece of code basically it is copied from
>ExpenseChangeRecord in ExpDB.c (from the Expense program)
>
>recordH = DmQueryRecord (dbP, *index);
>src = MemHandleLock (recordH);
>.....
>calculate new size
>.....
>MemPtrUnlock (src);
>err = MemHandleResize (recordH, newsize);
>if (err) showerror ("Resize failed", "", err);
>
>Now for some records I get err=257. The interesting thing is
>that it will happen to one record (which is no bigger than the others)
>but work fine for the others, I come back to the bad record and it
>still returns 257 on attempting to resize?????
>
>Resetting the device clears this problem and I can resize the record.
> Is it possible the record is locked somehow? The documentation states
>that a locked record will return memErrChunkLocked
>
>I get the problem on PalmOS 3.0 and 2.0.4.
>
>I really need some pointers on this I've had the problem for about 3
months.
>
>Thanks,
>Hamish
>
>
>
>