Subject Re: Inserting Blobs in SQL scripts
Author Adam
--- In firebird-support@yahoogroups.com, Stefan Heymann <lists@...> wrote:
>
> I expect the answer to be NO, but I want to try anyway (Firebird
> has its surprises from time to time):
>
> Is there a way to insert Blob data via a script command. Something
> like a way to insert a base64 string as a blob?
>
> INSERT INTO MYTABLE (ID, BLOBFIELD) VALUES (1, <base64 here>);
>
> Is that possible?

Actually yes. Firebird will automatically cast a varchar to a blob, so
just write your insert statement as if it were a varchar field.

However there are some limitations:

* Maximum query size 64KB.
* Maximum varchar size 32KB.

FSQL is another tool similar to iSQL that allows you to use a special
syntax to insert a file in an insert statement, which (apart from
writing your own code) is the only way to add more than 32KB of base64.

Adam