Subject Re: Add Year function
Author alanpltse
Hi,

I used the this to declare the function:

declare EXTERNAL FUNCTION ADDYEAR [DATE, integer]
returns date by value
entry_point 'ib_udf_addyear'
module_name 'ib_udf'


When I compile a stored procedure to call the ADDYEAR, an error is
ADDYESR is not defined.


--- In firebird-support@yahoogroups.com, "Adam" <s3057043@...> wrote:
>
>
> > How do I declare that in the database using IBExpert or EMS
> IBManager ?
>
> AddYear is not a built in function in Firebird. It is an external
> function (UDF). In order to access an external function, your
> database must contain the details of the function (what its called,
> what parameters are there, what are the data types, how to clean up
> memory, and which dll the function call is in). If your database does
> not contain the declaration, you might as well be
> calling 'FlyToTheMoon', because Firebird will have just as much idea
> how that can be done.
>
> Although AddYear is an external function, it is inside a library that
> ships with Firebird. Specifically:
>
> [Firebird install path]\UDF\fbudf.dll
>
> There is a corresponding .sql file in the same folder that contains
> the declarations. You just need to find the appropriate one and run
> it (or just run the whole script).
>
> But the rule is, if you haven't declared the external function inside
> the fdb itself, you can't use it.
>
> Adam
>