Subject Re: [firebird-support] Re: Converting a JPEG to a blob...
Author Helen Borrie
At 06:09 AM 22/09/2006, you wrote:
> > Firebird only supports direct blob inserts into text blobs, not
>binary data.
>
>
>so no even manipulating the image as a giant string would work? and
>possibly as a varchar?

No. The whole point of a BLOB ("binary large object") is to pass
binary objects (such as a JPEG) without concern as to their contents or size.

Internally, the engine uses a blob filter to make "text sense" of a
blob of sub_type 1. Sub_type 1 is a text blob. Since Fb 1.5 an
internal function in the DSQL parser enables a string to be converted
to text blob at the server side of the interface. It's merely a
convenience for programmers and has to be used with
caution. Varchars are limited to 32,765 bytes, so even this won't
work for text blobs if the data is potentially larger.

The API has functions for passing chunks of binary data from an
application as segments of a blob. Most API interface layers
implement client-side functions that do all the spade-work to allow
you to do this painlessly. However, there is no way to pass blob
data in scripts, which are entirely alphanumeric.

./heLen