Subject Re: [IBO] TIBOQuery bug?
Author Helen Borrie
At 08:41 PM 26/03/2003 +0000, you wrote:
>Using a TIBOQuery through a TIBODatabase (version 4.21) with SQL something
>like:
>
>select acode, aname from sometable
>where acode like :s
>or aname like :s
>
>After about four changes of the parameter using parambyname (closing the
>query before change, then opening it) the query blows up.
>
>If I change one of the :s parameters for :s1, thus it doesn't have the
>same parameter in the query twice, then it performs fine with absolutely
>no other changes.
>
>Could there be a bug associated with the use of the same parameter twice?

No, it's a bug in your statement!

Parameters and parameter values are not the same thing. A parameter is an
object associated with a database column. The token ":paramname" is a
reference to the parameter, not its value. You can apply the same VALUE to
two different parameters, but you can't apply the same parameter to two
different columns.

Helen