Andres,

You are forgetting one important point in your code.

HINT: Re-read the description of the sizeP parameter in the ExgDBReadProcPtr
docs:

<-> sizeP The size of dataP. This value is set by
ExgDBRead to the number of bytes it expects to
receive in dataP. You must set this value to the
number of bytes you return in dataP (if it's not
the same).

David Thacker


"Andres Cabezas Ulate" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Has any one else had problems with ExgDBRead in that this function tries
to
> read too much data when it processes the last record in a PDB image?  In a
> program I'm developing, ExgDBRead passes a very large number in the size
> variable to my ReadProc-style callback function when it gets to the last
> record in a PDB image.  The size parameter is much larger than the actual
> size of the last record, even though for any other record in the PDB
image,
> the exact size is passed in.
>
> This behavior will force me to design an ugly workaround in my callback
> function or to implement my own database reading function.  I would first
> like to verify, if possible, that this is a bug with ExgDBRead, and not
> that I'm making some kind of error myself.
>
> Thanks,
>
> Andres Cabezas
>
>
> (P. S. From what I can tell, ExgDBRead calls the ReadProc callback
function
> once for the PDB header, once for the record list header, once for each
> entry in the record list, placeholder/padding bytes, and once for each
> record in the PDB, at least in the Palm OS version I've tested with.  The
> PDBs I'm processing don't have a sort info or app info block, so I can't
> tell how ExgDBRead behaves with those.)
>
>
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to