Subject RE: [ib-support] Firebird, Stored Procedures, and BLOB parameters
Author Alan McDonald
Jerome,
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.

Alan
PS. I also note that passing a subtype 0 parameter to a stored procedure
parameter declared as subtype 1 or vice versa will not raise an exception
with the old visigenic ODBC driver, the GEMINI driver does, however,
correctly object and raises an exception.



-----Original Message-----
From: Jerome Bouvattier [mailto:JBouvattier@...]
Sent: Tuesday, 25 March 2003 8:22 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Firebird, Stored Procedures, and BLOB
parameters


Hi,

>----- Original Message -----
>From: Alan McDonald
>To: ib-support@yahoogroups.com
>Sent: Tuesday, March 25, 2003 4:42 AM
>Subject: RE: [ib-support] Firebird, Stored Procedures, and BLOB parameters

>ok - maybe you didn't mean that...
>you didn't correct Robert on his statement...

>"Interbase 6 documentation (since it's the only reference I could find on
>Stored Procedures for Firebird) and it stated that the only types that
could
>not be input parameter types to stored procedures were ARRAY and BLOB
types"

>but inferred that it was already supported (in Firebird - my assumption)

>Alan
>PS: I've never read this statement in the documentation but if it's there,
>it's clearly wrong

That's what I thought until I get an "Invalid BLOB id" error. I searched the
borland archives I found posts (such as http://tinyurl.com/83p9) saying that
the doc what right in the sense that you can't predict if passing BLOB
params will work or not. Bottom line seems to be "it might work, it might
not"...

This is true for IB 6 and I learnt it the hard way. Now I searched in FB's
release notes to see if it had been fixed, but found nothing.

Can someone confirm it has been fixed in FB ?

Regards.

--
Jerome



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/