Subject | Re: UDF Failure |
---|---|
Author | mircostange |
Post date | 2002-03-26T14:58:55Z |
Ian,
I ran accross the same problem some time ago. The select statement
you specified is not supported by Firebird/Interbase (it has never
been supported AFAIK - so what did you have working then?).
Furthermore, I tried to embed this in a view
create view xyz as
select string_to_blob('th') from rdb$database
which gives good results, but dramatically increases the database
size due to a garbage collection bug/feature. Search for my previous
posts regarding this.
Mirco
I ran accross the same problem some time ago. The select statement
you specified is not supported by Firebird/Interbase (it has never
been supported AFAIK - so what did you have working then?).
Furthermore, I tried to embed this in a view
create view xyz as
select string_to_blob('th') from rdb$database
which gives good results, but dramatically increases the database
size due to a garbage collection bug/feature. Search for my previous
posts regarding this.
Mirco
--- In ib-support@y..., "iananewby" <ian@w...> wrote:
> Hi All,
> Environment: Windows XP, Firebird 1.0rc2 Dialect 1
>
> I have a udf written in c which is cross platfor
> m (linux,windows). Its been working fine on both interbase 6,
> firebird 0.94, 1.0RC2.
> Now however, if i try and access one of the functions from isql I
> get:
>
> SQL> select string_to_blob('th') from rdb$database;
>
> STRING_TO_BLOB
> =================
> Statement failed, SQLCODE = -804
>
> Dynamic SQL Error
> -SQL error code = -804
> -SQLDA missing or incorrect version, or incorrect number/type of
> variables
>
> The definition returned by idql is:
> SQL> show function string_to_blob;
>
> Function STRING_TO_BLOB:
> Function library is wmudflib
> Entry point is fn_string_blob
> Argument 1: CSTRING(32000) CHARACTER SET NONE
> Returns BLOB
>
> The only thing that has changed is the database has been recreated
> by extracting the metadata (from idql) and recreating it from the
> script.
>
> The portion of the script is as follows:
>
> DECLARE EXTERNAL FUNCTION STRING_TO_BLOB
> CSTRING(32000) CHARACTER SET NONE, BLOB
> RETURNS PARAMETER 2
> ENTRY_POINT 'fn_string_blob' MODULE_NAME 'wmudflib';
>
> The only difference from my original script to add the functions is
> the CHARACTER SET NONE added by the isql extract.
>
> Has anyone any idea why this has stopped working?
>
> Regards
> Ian A. Newby