Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 Using DLL functions in Remote View
Message
From
15/09/2004 03:14:10
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00941810
Message ID:
00942269
Views:
26
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform