Calculating Fields
From InterBase
Go Up to Determining and Setting Dataset States
Delphi puts a dataset into dsCalcFields
mode whenever an application calls the dataset’s OnCalcFields
event handler. This state prevents modifications or additions to the records in a dataset except for the calculated fields the handler is designed to modify. The reason all other modifications are prevented is because OnCalcFields
uses the values in other fields to derive values for calculated fields. Changes to those other fields might otherwise invalidate the values assigned to calculated fields.
When the OnCalcFields
handler finishes, the dataset is returned to dsBrowse
state.
For more information about creating calculated fields and OnCalcFields
event handlers, see Using OnCalcFields.