Subject Re: TIB_Query parameter issue
Author rogervellacott
Here is one simple but quite efficient way. Other people will be
able to tell you how to link two IB_ queries together so that all
this gets done automatically - I just prefer to control it explicitly.


procedure Q1AfterOpen(Dataset:TDataset);
begin
Q1AfterScroll(Dataset);
end;

procedure Q1AfterScroll(Dataset:TDataset);
begin
with Q2 do
begin
RefreshOnParamChange := True;
if not Prepared then Prepare;
ParamByName('FirstParam').Value := Q1.FieldByName
('FirstParam').Value;
//etc
Active := True;
end;
with Q3 do
begin
RefreshOnParamChange := True;
if not Prepared then Prepare;
ParamByName('FirstParam').Value := Q1.FieldByName
('FirstParam').Value;
//etc
Active := True;
end;
end;

Setting the property RefreshOnParamChange can be done on the
component, rather than in code. It seems to give much better
performance than coding explit refreshes, but I don't think the
setting is available in the iboTDataset components.


Roger Vellacott
Passfield Data Systems Ltd

--- In IBObjects@yahoogroups.com, "radu_zorro" <radu_zorro@...> wrote:
>
> hi,
>
> can some give me an advice to my problem? it is urgent, and i need a
> starting point. any small piece of information is welcomed.
>
> i have for example 3 queries: q1,q2,q3.
>
> q2 and q3 had as input parameters values received from q1 output
> parameters(there's no issue related to datatypes). how can i link
> these queries, so when i making a scroll over the q1, q2 and q3 to
> autatically refresh?
>
> best regards,
>