Subject Re: [firebird-support] Re: Blob - Invalid segment size
Author Helen Borrie
At 05:30 AM 3/06/2008, you wrote:

>> Try to Write image_buffer in loop using smaller chunks, say 64K-3.
>Thanks Vlad, and eveybody who responded:
> This works.
> Helen, perhaps you might mention in your excellent book that
>reading and writing blobs larger than 64KB - 1 in size must be done as
>a series of reads and writes, in blocks with sizes less than 64KB - 1.

As a (mainly) Delphi programmer I don't encounter this problem. I guess the interface I use (IBO) has long ago resolved the issues around the packaging of blob data for the wire. I do recall that the native Delphi VCL in times past, over many versions, had such problems with a self-imposed limit on blob buffer size. I haven't thought about it for a long time, since I've been an IBO user now for nearly 10 years. I think the (64K - 1) limit in that case was due to the VCL treating blobs as strings at the client and itself limiting the number of bytes it could handle.

So it's not a situation that really has a place to go in The Book. If we can get some firm facts about how these various API wrappers are managing blob buffers, rightly or wrongly, then It could be an alert in the API book if there's a real issue. If you take this problem to the IBPP forum, it could be a helpful outcome for other IBPP users to get the IBPP rules clarified with respect to this apparent limit...