Subject Re: [firebird-support] Re: ABS() UDF in FB 1.03?
Author Helen Borrie
At 12:35 AM 22/06/2004 +0000, you wrote:
>--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
>wrote:
> > At 11:00 PM 21/06/2004 +0000, you wrote:
> > >Hi All,
> > >
> > >I've declared the ABS() UDF in my database as so.
> > >
> > >DECLARE EXTERNAL FUNCTION abs
> > > DOUBLE PRECISION
> > > RETURNS DOUBLE PRECISION BY VALUE
> > > ENTRY_POINT 'fn_abs' MODULE_NAME 'udflib';

The function ABS is in ib_udf.dll: here is the declaration:

DECLARE EXTERNAL FUNCTION abs
DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';

Notice the name of the ENTRY_POINT.

First, drop the non-existent function that you have declared, and commit:

drop external function abs;
commit;

Then redeclare it with the correct entry_point and module_name (you can
actually copy this directly from ib_udf.sql, in your UDF directory).

> > >
> > >The database accepts this and IBExpert shows ABS() as one part of
> > >the database.

At the point where you declare it, the database doesn't know what is in an
external library. The declaration is where you tell it.


> >
> > 1. Where is your udflib located?
> > 2. What is your UDFAccess setting in firebird.conf?
> >
> > /heLen
>
>The UDF is C:\Program Files\FireBird\UDF\fbudf.dll which is were
>Firebird's install placed it.

There is no function abs() in fbudf.dll.

>I don't know anything about
>UDFAccess. I haven't seen anything in the stuff I've read that
>talks about it.

Try reading the release notes. You can search them using Ctrl-F.

>Also, I've been using the SUBSTRING function and
>haven't declared it anywhere. Aren't they both in the same lib?

No, SUBSTRING is an internal function, not a UDF.

/heLen