Subject RE: [firebird-support] Re: Embedded Database connect -904, "unavailable database?
Author Alan McDonald
> > Are we talking about the same thing?
> >
> > UDF / External functions are calls from within the Firebird engine to
> > dlls usually to add functionality to the engine (eg, absolute value)
> >
> > To use a UDF, that udf must be declared in a database. This
> > declaration looks something like this:
> >
> > DECLARE EXTERNAL FUNCTION abs
> > DOUBLE PRECISION
> > RETURNS DOUBLE PRECISION BY VALUE
> > ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';
> >
> > You will note that part of the declaration is the MODULE_NAME, which
> > tells Firebird which dll the entry point is in. If ib_udf.dll waas
> > renamed to wilma.dll, then the external function would need to be
> > declared as:
> >
> > DECLARE EXTERNAL FUNCTION abs
> > DOUBLE PRECISION
> > RETURNS DOUBLE PRECISION BY VALUE
> > ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'wilma';
> >
> > Obviously, your UDF dll will need to be named according to what the
> > declaration says (or vice versa).
>
> I don't think this is what I am talking about. The problem I have
> run into is that some UDF dlls link BACK to fbclient.dll for some
> functionality and if your dll does not have that name, it will not
> find it. Is there a way around that problem?
> ________________________________________________________
> Richard Wesley Software Engineer

yes - expose the UDFs to us.. it shouldn't happen i.e. the UDF should not be
written this way. It must be trying to make another connection to the
database.
Alan