Subject Re: [firebird-support] Re: named parameter always replaced by '?'
Author Helen Borrie
At 02:14 PM 27/11/2004 +0100, you wrote:

>Hello Roberto,
>
> > I'm sorry, I was trying out a few procedures and I paste the wrong
> > extract of a different procedure which is not related to the earlier post.
> >
> > So the correct modified part of the stored procedure related to the
> > earlier post is as follows:
> >
> > -----
> > CREATE PROCEDURE TEST (
> > FIELD1 INTEGER)
> > RETURNS (
> > FIELD2 INTEGER)
> > AS
> > Begin
> > FOR SELECT FIELD2 FROM TABLE1
> > WHERE FIELD1 = ? /* PRM_0 */
> > INTO "FIELD2"
> > DO
> > BEGIN
> > SUSPEND;
> > END
> > End
> > ------
> >
> > I tried using upscene latest dbexpress trial driver, I notise '? /*
> > PRM_0 */' was inserted into the procedure. Any clue?
>
>And this happens with "ParamCheck" = "False"?

The "clue" is that he is getting a ParamCheck happening inside stored proc
source. He should switch it off to stop the parser treating it as a
parameter (which it's not).

And correct the syntax of the SP to pre-empt the next exception (INTO
"FIELD2" will cause an exception once he fixes the ParamCheck problem).

./h