Subject Re: [IBO] :PARAM inside function call not working!
Author Helen Borrie
At 12:30 PM 9/06/2005 +0200, you wrote:
>Helen Borrie wrote:
>
> >Well, as far as I can tell, it is *not* possible to fool the engine that
> >your parameter could be something it knows about.
> >
>You mean this is a Firebird feature? That's not well :-/
>
> >I'm curious about what you think would be returned by your statement,
> >actually. To me, it looks like a statement which (if passed a valid
> >argument) will return either an empty set or all of the rows in the table,
> >regardless of what your UDF actually does:
> >
> >
> >
>No, you're wrong :) The function is called for each row. I'ts purpose is
>to do regexp matching, it returns 0 when first argument matches
>expression in second argument.

OK, you seem happy with it. :-) I was just curious...

Anyway, back to your problem. As I suggested at the beginning, I think the
only chance you have of the engine recognising your parameters as SQL Types
is if you use descriptors to define them. I'm up to my ears on something
highly urgent at the moment, otherwise I'd play with it for you.

As a reality check, set up a little testcase for yourself in IB_SQL, using
one of the "by descriptor" functions in fbudf. You can get the
declarations from fbudf.sql. Use the Cursor tab, prepare the query and use
the Params tab to enter your param values (no quotes needed on strings there).

Helen