Subject udf won't do what it should
Author martinknappe
hello
i'm posting this in this forum because in the delphi forum no one was
able to help me out:
i've written a udf with delphi for my interbase database and i think
i've very much followed all the necessary instructions for doing so
(according to the tutorial under
http://www.ibphoenix.com/main.nfs?a=ibphoenix&l=;PAGES;NAME='ibp_howto2'

When testing the dll with my own sample application it does exactly
what it's supposed to do (namely, replace a sequence of characters in
a widestring by a different sequence of characters)
You can find the dll project and the one for the sample app under:

http://www1.file-upload.net/download_23.06.06/43lh4z.rar.html

now, the problem comes in when i want to use the function in my
firebird database. i declared the udf via:

DECLARE EXTERNAL FUNCTION REPLACESUBSTRING
CSTRING(100),
CSTRING(100),
CSTRING(100)
RETURNS CSTRING(100) FREE_IT
ENTRY_POINT 'Replace' MODULE_NAME 'MyFirebirdUDFs'

And then, in order to test it, I do the following:

select replacesubstring('Mafter', 'af', 'us') from rdb$database

This should evidently give me 'Muster' as a result. But instead what I
get is 'Mafter' again. What am I doing wrong here?

Thanx,

Martin