How is OnCalcFields event handler used in Delphi?

Questions by Robert   answers by Robert

Showing Answers 1 - 3 of 3 Answers

Dusko Acevski

  • Jul 28th, 2007
 

Hi Robert

OnCalculate is event in Delphi it trigerrs when you are reading data from the database .

NOTE : It trigerrs on reading each row
Stupid Example :
if you want to subtract two coolumns from database table then you override this event with

procedure TForm1.ADOQuery1CalcFields(DataSet: TDataSet);
begin
Variable_b=adoQuery1.fieldByname('Name_Of_the_DbColumn1').asfloat +adoQuery1.fieldByname('Name_Of_the_DbColumn2').asfloat;

Showmessage(floattostr(Variable_b));
end;

Regards Dusko Acevski

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions