Subject Fwd: FB 1.5 OldParameterOrdering question
Author Daniel Rail
Hi all,

More information in regards to the subject.

Jason, are you already working for a fix for a later release of IBO?
I think that it is essential that IBO verifies the ordering of the
parameters, since it might not always be known which one the Firebird
server will be using.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)



This is a forwarded message
From: Nickolay Samofatov <skidder@...>
To: firebird-devel@...
Date: Wednesday, April 16, 2003, 7:32:38 AM
Subject: [Firebird-devel] OldParameterOrdering question

===8<==============Original message text===============
> Hi,

> At April 16, 2003, 06:37, Nickolay Samofatov wrote:

>>> The problem appears only with IBO and where there is a parameter in the
>>> WHERE clause, when the parameters types are filled with wrong values. In
>>> the case above, :sales_rep, wich should be of type smallint, appears as
>>> type datetime.

>> Problem is that IBO transforms query before sending it to server in
>> unknown (to me) way. Possibly it adopted workaround (as some other
>> tools do) to FB1/IB bug with parameter ordering and needs
>> OldParameterOrdering=1 (simulation of FB1 parameter bugs).
>> If this is the case IBO needs to be fixed to check for parameter
>> ordering that is in effect and implement workarounds for FB1 bugs
>> and do correct way with FB1.5.

> I can confirm that IBO did adopt a workaround for the FB1/IB bug with
> parameter ordering. Is there an API call that would be able to verify
> which parameter ordering the server is using? And, if it exists, then
> I think it would be of great interest to Jason Wharton.

I already wrote here how to check for correct parameter ordering.
Just issue a query:
--
select (select 1 from rdb$database where 1=?)
from rdb$database where 2=?
--
with first parameter equal to 1 and second parameter equal to 2.
FB1.5 with OldParameterOrdering=0 will return a single row.
FB1/IB and FB1.5 with OldParameterOrdering=1 will not return any rows.


Nickolay Samofatov

===8<===========End of original message text===========