I had the NULL handle problem with redrawing my table cells before. I'm
using my own custom table drawing callback to draw my cells. 
The way I get data for the cell is to use recH=DmGetRecord(xxx, index),
and after I'm done drawing, I did a MemHandleFree(recH). 
Which is wrong and BAD. Because the next time I try to access that same
record index, there is no MemHandle to it, and I'm trying to draw data
from it.
MemHandles can be multiple locked, and the only way for a
DmQueryRecord() to return a NULL handle is if DmQueryRecord() doesn't
have anything to return (like a record that has already been freed?). So
says the documentation.

Hope this helps, chances are, I haven't given you all possible
explanations. I've only been doing this for a couple of months. 


Andrew Lathrop wrote:
> 
> I have a table in my app.  The way i am using the table, once the user
> selects a table item, they then have to click a button to edit the record,
> delete it, etc.  The table and buttons work fine.  But, if the user double
> clicks the table selection, (selects it twice without clicking anything
> else) two things happen.  1) For any record besides the first, the cell is
> redrawn with some new value.  2) I get an error about MemoryMgr.c causing a
> NULL handle error.
> The only reason i can come up with for the NULL handle error is that the
> handle is locked, and then locked again without being unlocked.
> I have the following two lines of code where the error appears to come from.
> I have a breakpoint set at precord =, and can see that hrecord has a value,
> except when it is double clicked.  Then the value is 0x00000000, which
> causes the error since it then tries to lock the memory at that location,
> and none exists.  Is there anyway around this?
>  hrecord = DmQueryRecord( sonomaDB, record );
>  precord = MemHandleLock( hrecord );
> 
> Thanks,
> Andrew


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to