Subject Re: [ib-support] UDF Problem
Author Doug Chamberlin
At 1/4/2001 12:06 AM (Thursday), RBT wrote:
>Statement: create procedure ClearLog
>Returns(Result char(1))
>as
>declare variable GotIt char (1);
>begin
> begin
> select Credit from AccessControl
> into GotIt;
> end
> begin
> Result = CLEARIBLOG(GotIt);
> end
>end

After a quick read of your posting I think the problem might lie in the
syntax of the call to the function. Could be something else, but I'd look
closely at the UDF call.

I don't think that UDF's can be called like functions in a regular
language. I think you need to use either a SQL "EXECUTE" statement or embed
the UDF call into a SQL "SELECT" such as

SELECT CLEARBILOG(GotIt) FROM RDB$DATABASE INTO RESULT;

(The RDB$DATABASE being an always-present table which will always have only
one record in it.)