Subject | Re: [ib-support] Re: UDFs returning BLOB cause error -804 |
---|---|
Author | Helen Borrie |
Post date | 2002-02-27T12:58:30Z |
>mircostange wrote:At 01:14 PM 27-02-02 +0100, Paul R wrote:
>
>This declaration:
>
> > declare external function f_StrBlob
> > cstring(254),
> > blob
> > returns parameter 2
> > entry_point 'StrBlob' module_name 'FreeUDFLib.dll';
> >
>appears to want two input parameters, so I'm not surprised thatNo, the declaration is correct in that it identifies the second parameter
>f_strblob('X') doesn't work.
as the return parameter. The real problem is that dsql doesn't have a
definition into which to put the output, since it doesn't have an existing
blob column to refer to.
You can bring in a blob from a blob column, i.e.
CREATE TABLE BLOBTABLE (
ID INTEGER NOT NULL,
ABLOB BLOB SUB_TYPE 1,
CONSTRAINT PK_GUM
PRIMARY KEY ( ID ) );
commit;
insert into blobtable
values(1, StrBlob('claudio''s toys'));
commit;
select ablob from blobtable where id = 1; (works fine)
but you can't do
select StrBlob('All the Pauls') from blobtable; (or any other table)
What mystifies me is that mirco is getting the wrong error message. I get
ISC ERROR CODE:335544358
ISC ERROR MESSAGE:
message length error (encountered 28, expected 36)
which is what I'd expect, since there is no blob_id, i.e. 8 bytes not there
that should be.
Helen
All for Open and Open for All
Firebird Open SQL Database ยท http://firebirdsql.org
_______________________________________________________