Subject Re: [firebird-support] UDF - Function Unknown why ?
Author Helen Borrie
At 08:55 AM 12/11/2004 -0200, you wrote:

>I'm trying to use the function AddDay in fdudf.dll, I defined this UDF
>like:
>
>DECLARE EXTERNAL FUNCTION "addday"
> DATE,
> INTEGER
> RETURNS DATE
> ENTRY_POINT 'addDay' MODULE_NAME 'fbudf';
>
>I compiled and all right, but when I use I received this:
>
>select date_insert, addday(date_insert, 5)
> from mytable
>
>fmSQLEditor.Query:
>An error was found in the application program input parameters for the
>SQL statement.
>Dynamic SQL Error.
>SQL error code = -804.
>Function unknown.
>ADDDAY.
>
>What is wrong ?

Because you declared the function name in quotes, you have made it force
you to use it exactly that way. The function name is now "addday", not
ADDDAY. You have made it case-sensitive and you must use the quotes.

Tip: Do this:

DROP EXTERNAL FUNCTION "addday";
commit;

DECLARE EXTERNAL FUNCTION addday
DATE,
INTEGER
RETURNS DATE
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf';

./heLen