Subject RE: [ib-support] Firebird, Stored Procedures, and BLOB parameters
Author Thomas Steinmaurer
Hi all,

> I read with interest, these postings you quote...
> the example shown, which rightly will have unpredicatble results, declares
> the BLOB input parameters without the SUB_TYPE 1 SEGMENT SIZE 80
> subclause. (or SUB_TYPE 0 meaning binary).
> If this decalration is used then there is no guarantee of reliable success.
> On the other hand, if the input variable is declared correctly.. e.g.
> CREATE PROCEDURE UPDBROCHURE (
> BRONO INTEGER,
> TITLE VARCHAR(50) CHARACTER SET NONE,
> BLURB BLOB SUB_TYPE 1 SEGMENT SIZE 80,
> IMAGE1 VARCHAR(50) CHARACTER SET NONE,
> SECCATEGORY SMALLINT,etc
>
> there will be no problem. I have been using this method extensively since
> Version 5.0 thru 5.6, 6.01 and 6.02 on many databases without an error.
>
> Thomas Steinmaurer's example reads
> RECREATE PROCEDURE P_INSERTINTOIBLM$COLUMNLOG (LOGTABLE_ID Integer, SPALTE
> VarChar(31), ALTERWERT VarChar(255), NEUERWERT VarChar(255), ALTERWERTBLOB
> BLOB, NEUERWERTBLOB BLOB) AS
> BEGIN
>
> and although he says it works for him, I have experienced the random nature
> of success with this declaration.

Yes, it works for me since three years now, although in the
"Using Firebird" book (on the IBPhoenix CD) states on p. 489/490
that the data type for input and output parameters can be any
standard SQL data type *except* BLOB and arrays ;-).

Regards,
Thomas.