I try to recalc all fields of a TMSQuery without refreshing the data from the database server. The background is, that I have a field, that is dependet from the current time. Example:
DB-Field 1: TStart: TDateTime;
DB-Field 2: TStop: TDateTime;
Calc-Field: Duration: TDateTime;
In the OnCalc-Event the Duration will be calced as follows ():
Code: Select all
if not TStop.IsNull then
Duration.AsDateTime := TStop.AsDateTime - TStart.AsDateTime
else
Duration.AsDateTime := Now - TStart.AsDateTime;
Any idea?
Alex