Subject Re: [IBO] Another parameter example
Author Paul Hope
Hi Paul

I remember parameter problems with the new FB versions but dont remember any
resolution to the occurring twice problem. I can get round this particular
one by rewriting it to dynamic SQL. However I use multiple parameter
occurrence a lot and it really needs to be resolved.

Regards
Paul


----- Original Message -----
From: "Paul Vinkenoog" <paul@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, August 05, 2003 11:11 AM
Subject: Re: [IBO] Another parameter example


> Hi Paul,
>
> > Heres another example of parameter values getting in a twist
>
> > select * from CUSTOMER where
> > ...
> > (('?'=? /* OC */ )or(TERMS=? /* OC */ )) and
> > (('?'=? /* VC */ )or(VAT_CLASS=? /* VC */ )) and
> > ...
>
> > EXECUTE STATEMENT
> > TR_HANDLE = 21446788
> > STMT_HANDLE = 21455072
> > PARAMS = [ Version 1 SQLd 22 SQLn 22
> > [CO] = 'A'
> > ...
> > [OC] = '?'
> > [OC] = <NULL>
> > [VC] = 'H'
> > [VC] = <NULL>
> > ...
>
> > For some reason the second occurence of OC and VC are NULL whereas
> > other seamingly similar parameters are OK.
>
> If you use the same parameter more than once in your SQL, chances are
> that two different parameters are created and passed to the server,
> the second one uninitialized (since you don't know it's there, you
> won't set it).
>
> You can avoid this, but I don't remember how. However, this has been
> discussed several times on the list during the last half year or so,
> so doing a search could help you here. (Or a reply from someone who
> *does* remember ;-))
>
>
> Greetings,
> Paul Vinkenoog
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>