Subject | Problem with IB_Query Calculated Fields |
---|---|
Author | Francis Moore |
Post date | 2000-11-12T16:55:39Z |
I have a problem with IB_Query and calculated fields in that IB_Query
is not returning calculated fields - it delivers just row when the
row is selected and row twitches indicating that the row is being
constantly updated.
I have set up an IBOQuery in parallel and this works as expected.
I enclose onCalc code for IB_Q and IBO.
procedure TSchemesForm1.IB_Query6CalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
var
intbal : Double;
begin
intbal:= intbal + IB_Query6.FieldByName('amount').AsFloat;
IB_Query6.FieldByName('Balance').AsFloat:= intbal;
IB_Query6.FieldByName('abc').AsString := IB_Query6.FieldByName
('descript').Value;
end;
procedure TSchemesForm1.IBOQuery1CalcFields(DataSet: TDataSet);
var
intbal : Double;
begin
intbal:= intbal + IBOQuery1.FieldByName('amount').AsFloat;
IBOQuery1.FieldByName('Balance').AsFloat:= intbal;
IBOQuery1.FieldByName('abc').AsString := IBOQuery1.FieldByName
('descript').Value;
end;
[I appreciate that intbal is declared locally and therefore the
balance will not increment - this was just the first step].
For IB_Query both ABC and Balance are set up as computed fields.
What am I doing wrong with IB_Query?
Looking forward to your assistance.
Kind regards,
Francis Moore
is not returning calculated fields - it delivers just row when the
row is selected and row twitches indicating that the row is being
constantly updated.
I have set up an IBOQuery in parallel and this works as expected.
I enclose onCalc code for IB_Q and IBO.
procedure TSchemesForm1.IB_Query6CalculateField(Sender: TIB_Statement;
ARow: TIB_Row; AField: TIB_Column);
var
intbal : Double;
begin
intbal:= intbal + IB_Query6.FieldByName('amount').AsFloat;
IB_Query6.FieldByName('Balance').AsFloat:= intbal;
IB_Query6.FieldByName('abc').AsString := IB_Query6.FieldByName
('descript').Value;
end;
procedure TSchemesForm1.IBOQuery1CalcFields(DataSet: TDataSet);
var
intbal : Double;
begin
intbal:= intbal + IBOQuery1.FieldByName('amount').AsFloat;
IBOQuery1.FieldByName('Balance').AsFloat:= intbal;
IBOQuery1.FieldByName('abc').AsString := IBOQuery1.FieldByName
('descript').Value;
end;
[I appreciate that intbal is declared locally and therefore the
balance will not increment - this was just the first step].
For IB_Query both ABC and Balance are set up as computed fields.
What am I doing wrong with IB_Query?
Looking forward to your assistance.
Kind regards,
Francis Moore