3 Replies Latest reply on Oct 3, 2003 3:57 PM by soman33

    Questions regarding LONG RAW field.

    soman33
      Did anybody know what the byte alignment is for the OO4O class library?

      Also, what's the maximum number of bytes the OField's GetValue or GetChunk function calls can retrieve at one time?

      I am having some problem with retrieving a LONG RAW field from a table - getting OSUCCESS with the GetValue call but zero bytes returned? I'm sure there's data as the return value of GetServerSize function is non-zero... Any suggestion on how I can find out what's wrong?

      I am using OO4O 8.1.7.3.11.
      Any help will be greatly appreciated. Thanks in advance!
        • 1. Re: Questions regarding LONG RAW field.
          58568
          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 returned
          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.
          • 2. Re: Questions regarding LONG RAW field.
            soman33
            Thanks for your response!
            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.
            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).
            • 3. Re: Questions regarding LONG RAW field.
              soman33
              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