Subject Re: [IBO] :PARAM inside function call not working!
Author Robert Osowiecki
Helen Borrie wrote:

>1. Make sure the statement is prepared before you try to refer to its
>Params. A simple
>if not MyStatement->Prepared
> MyStatement->Prepare
>
>
>
Now I'm getting the same error at Prepare() statement :)

>2. Check whether the UDF declaration is by value, by reference or by
>descriptor.
>
Hmm... I created it basing on another UDF library. SQL declaration goes as:

DECLARE EXTERNAL FUNCTION PCRE_SIMILAR CSTRING(255), CSTRING(255)
RETURNS INT ENTRY_POINT 'ibpcre_similar' MODULE_NAME 'ibpcre';

and DLL function header is:

int _export ibpcre_similar(char * subject, char *pattern);

I tested it in IBExpert -- it works alright.

>SELECT * from ARTICLEDATA
>where (my_udf_function(
> ar_code,
> cast(:AR_CODE as varchar(whatever))
> )=0)
>
>
>
CAST did not help either...

Robson.