Subject Re: [IBO] Parametric TIBOQuery bug
Author Nando Dessena
I wrote:

N> I have a "master" TIBOQuery component which has a DataSource attached,
N> and a "slave" TIBOQuery components which is attached to that
N> DataSource:

Master ->> MasterDataSource -> Slave

N> Slave is an update statement, but my point is demonstrated
N> with select queries as well.

N> Let's make an example:

N> master is select id from mastertable

N> slave is update someothertable where someid = :id and foo = :foo

N> If I do

N> slave.ParamByName('foo').AsString := 'bar';
N> slave.ExecSQL;

N> the result is wrong because the ID param value is not fetched from the
N> master.

N> If I do

N> slave.ParamByName('id').AsString :=
N> master.FieldByName('id').AsString;
N> slave.ParamByName('foo').AsString := 'bar';
N> slave.ExecSQL;

N> of course it works.

N> If slave has only params named after fields in the master (ie no
N> custom params) then it works. In other words, adding a custom param
N> prevents fetching the master values.

N> Needless to say it works beautifully under the BDE.

N> As usual I have put up a simple test case that shows the problem at the click
N> of a button with the employee database.

Doesn't that look like something needing a reply?

Ciao
--
Nando mailto:nandod@...