> From: "Codebue Fabio - P-Soft" ... > function pround(var valore: real; ndec: integer):real;export; ... > DECLARE EXTERNAL FUNCTION pround > DOUBLE PRECISION, INTEGER > RETURNS DOUBLE PRECISION BY VALUE > ENTRY_POINT 'pround' MODULE_NAME 'pudf'; > > if I use it with an instruction like this > > select round(123.1233, 2) as nrounded from rdb$database > > I have back this error > > Invalid token. > invalid request BLR at offset 59. > function PROUND is not defined. > module name or entrypoint could not be found. > > do you have some idea regarding this error?
I guess you made a typo in your select statement, since it calls round, not pround. It would appear that Firebird cannot load the dll/so or find the entry point to the function in the dll. Did you copy the dll/so to the UDF subdirectory of your Firebird diretory? You could also try adding the extension (.dll or .so) to the name of the library. If you are using Linux you should also check the permissions on the library and make sure that Firebird can load it. If this doesn't work, open the Firebird.conf file and check what the value for UdfAccess is. You may also have to change the calling convension of your function to cdecl, since that is what Firebird expects. Regards, Christo ---------------------------------------------------------------------------- NOTICE: Please note that this eMail, and the contents thereof, is subject to the standard Sasol eMail legal notice which may be found at: http://www.sasol.com/legalnotices If you cannot access the legal notice through the URL attached and you wish to receive a copy thereof please send an eMail to [EMAIL PROTECTED] ---------------------------------------------------------------------------- _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal