I need some help extracting bitmaps from a database filled on the palm.
I have set the DataType to ptString (ptCustom didn't work -> exception raised) an I do have the problem, that , when getting data with ...AsString the content is cut after the first Zero byte.
Has anyone some tips or example code to access bitmap data ?
Thanks,
A.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When dealing with custom types like bitmaps, ptCustom is the way to go. I'm not sure why it's raising an exception, though. Have you provided a custom OnReadField event method? This is necessary to process the raw data of the record and fit the data for the bitmap field into whatever structure you want to use - fairly easy if the bitmap is the only data in the record; otherwise you may need to do some pointer manipulation. See the samples for example OnReadField event handlers.
On a final note, if you are getting an exception, one thing to do is try doing a debug session to try and track down what the problem is. If it's anywhere, it's more than likely the record unpacker routines, and any OnReadField event handler you have.
Paul.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I need some help extracting bitmaps from a database filled on the palm.
I have set the DataType to ptString (ptCustom didn't work -> exception raised) an I do have the problem, that , when getting data with ...AsString the content is cut after the first Zero byte.
Has anyone some tips or example code to access bitmap data ?
Thanks,
A.
When dealing with custom types like bitmaps, ptCustom is the way to go. I'm not sure why it's raising an exception, though. Have you provided a custom OnReadField event method? This is necessary to process the raw data of the record and fit the data for the bitmap field into whatever structure you want to use - fairly easy if the bitmap is the only data in the record; otherwise you may need to do some pointer manipulation. See the samples for example OnReadField event handlers.
On a final note, if you are getting an exception, one thing to do is try doing a debug session to try and track down what the problem is. If it's anywhere, it's more than likely the record unpacker routines, and any OnReadField event handler you have.
Paul.