This content has been marked as final. Show 3 replies
Also, what's the maximum number of bytes the OField's GetValue or GetChunk function calls can retrieve at one time?With GetValue you can retrieve a max of 64k bytes. Anything larger, you can use GetChunk to retrieve data, specifying a max of 64k to read at a time.
I am having some problem with retrieving a LONG RAW field from a table - getting OSUCCESS with the GetValue call but zero bytes returnedAre you using GetValue on data larger than 64k? You can use GetFieldServerSize to check the size on the server. If it returns -1 than the size is larger than 64k.
Thanks for your response!
I did use GetServerSize and the size returned was only 5K. But when I used GetValue to try retrieving it, it returned OSUCCESS but zero bytes!?! What puzzled me was I had another LONG RAW field in another table which worked?!? Does the content of the field matter (shoudn't I would think)? The field I had problem with was an image (binary JPEG format), whereas the one that worked was a binary internal structure (~2K).
Are you using GetValue on data larger than 64k? You can use GetFieldServerSize to check the size on the server. If it returns -1 than the size is larger than 64k.
Finally figured out what the problem was.
It was related to the fact that the dynaset was not updatable; resulting in not able to retrieve any LONG RAW field with size > 4K (restriction of a LONG RAW column as documented). I was surprised that OO4O class library not returning any error code though.
I ended up converting the field to a BLOB, and was able to read it in with no problem. =P