Hi Dorin
>This is one of the coolest feature in Interbase/Firebird.
So this means I fire Marathon, open the database and execute the given statement and from then on it will work always for that database? And the directory name is C:\Program Files\Firebird\Firebird_1_5\UDF\ I found this already created in the folder and I will copy the dll there. That's nice, I can also get it copied there by InnoSetup on the clients machine, wow.
>No, you need to execute only once commands that declare UDFs (very similar with VFP DECLARE DLL command, but functions are available permanently for that database). After this, they will be available as definitions in database (as rows in RDB$FUNCTIONS database system table). You can remove definitions with DROP EXTERNAL FUNCTION . U D F libraries must be in \U D F\ subfolder of Firebird server root folder.
>
>A sample:
>
>DECLARE EXTERNAL FUNCTION PADRIGHT
> CSTRING(255), SMALLINT, CSTRING(1)
> RETURNS CSTRING(255) FREE_IT
> ENTRY_POINT 'fn_padright' MODULE_NAME 'rfunc'
>
>This SQL command will store UDF calling definitions/arguments. This UDF function is available in SQL commands after declaration.
>To remove definition from database:
>
>DROP EXTERNAL FUNCTION PADRIGHT;
>
>Usually all UDF libraries have SQL scripts for declarations, check files with .SQL extension, you don't have to write those scripts yourself.