Subject Re: [ib-support] UDF Failure
Author Claudio Valderrama C.
""iananewby"" <ian@...> wrote in message
> 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;
> =================
> Statement failed, SQLCODE = -804
> Dynamic SQL Error
> -SQL error code = -804
> -SQLDA missing or incorrect version, or incorrect number/type of
> variables

Ian, if you want to test this specific case, you should know that:
- it doesn't work in IB4, IB5, IB6, IB6.5 and FB1
- it works in FB1.1 when it's released.

Simply put, your test, selecting from a udf that returns blob, NEVER has
worked in any publicly known version. I know because there was a missing
condition in the code and also, testing in IB6.0 shows it doesn't work
Your test however worked if you enclosed the declaration in a view or
procedure. That should have been your correct case you remember.

Things are easy to explain once you find the problem: the engine believed
that the param for the blob was zero length, an impossible condition.

> Has anyone any idea why this has stopped working?

Because you are trying from the command-line directly. Get a collection of
all your favorite old IB releases and convince yourself.

Claudio Valderrama C. - -
Independent developer
Owner of the Interbase® WebRing