Subject RE: [firebird-support] bug in blob param
Author Helen Borrie
At 10:49 PM 2/09/2003 +1000, you wrote:
> > i tried to do:
> > execute procedure tst_blob('test');
> > and i got the same error.
> >
> > the only workarround i found is to change the param type to varchar like
> > this:
> >
> > CREATE PROCEDURE TST_BLOB (TEXT VARCHAR (100))
> >
> > it works, but i am not so happy because the field is a blob.
> >
> > thanks, Alan.
> >
>
>
>you can't pass a varchar to a blob..

Actually, in Firebird you can.

The error that Mariano is making is to declare a blob as input parameter
and then to pass a varchar in that parameter. A blob is a blob, not a
varchar. Parameters have to match BY TYPE.

Just because you can do

insert into aTable(myblobcolumn)
values ('This is some text");

...it is wrong to assume that a varchar and a blob are the same. It simply
means that the conversion is done for you in the DML statement.

heLen