>Hi Dorin
>
>>AFAIK, you must declare it with
DECLARE EXTERNAL FUNCTION command. After you declare it at database level,
>
>Where will that be as stored procedure? If so how can a Remote View access the procedure before executing the query.
>
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.
This is one of the coolest feature in Interbase/Firebird.
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.