Subject Re: [firebird-support] problems with udf
Author Helen Borrie
At 08:23 AM 18/06/2006, you wrote:
>i just wrote my first udf and tried to use it but it won't work.
>I wrote and compiled a dll which you can find here:
>Next, I declared the udf in ibexpert via copied the dll-file into my
>firebird-udf-directory and declared the udf in ibexpert via
> CSTRING(100), CSTRING(100), CSTRING(100)
>but when trying it out with
>select replace('hallo', 'a', 'e') from rdb$database;
>I get:
>Unsuccessful execution caused by a system error that precludes
>successful execution of subsequent statements.
>Access to UDF library "MyFirebirdUDFs.DLL" is denied by server
>I also tried to add the following to my firebird.conf file:
>UdfAccess = Restrict UDF; C:\Programme\Firebird\Firebird_1_5\UDF;
>But it all doesn't help?
>What's the trick here?

1) Did you stop and restart the server before trying to use the new
library ? The error message you got seems to indicate that you didn't....

2) You don't need the custom entry in firebird.conf if your UDF
library is in the default directory.

3) (not the cause of your current problem) Don't use REPLACE as a
UDF name. It is likely to become a reserved word in Firebird 3.

4) Didn't look at your code, but what calling convention do you use
to export your function? It needs to be cdecl, not stdcall.