Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 Using DLL functions in Remote View
Message
De
15/09/2004 03:14:10
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00941810
Message ID:
00942269
Vues:
27
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform