RAD Studio VCL Reference
TCustomADODataSet.OnWillChangeField Event

Occurs before a field is changed.

property OnWillChangeField: TWillChangeFieldEvent;
__property TWillChangeFieldEvent OnWillChangeField;

Write an OnWillChangeField event handler to take specific action before a pending operation changes the value of one or more ADO Field objects in the Recordset object. (The term "Field object" as used here refers to the ADO Field object, not VCL persistent field objects that descend from TField.) 

DataSet is the ADO dataset component that triggered the OnWillChangeField event. This dataset component also contains the recordset in question. 

FieldCount is the number of ADO Field objects in the Fields parameter. 

Fields is an array of Variants representing the ADO Field objects about to be changed by the operation. See the Microsoft Data Access SDK for more information on using ADO Field objects. 

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: : A Recordset object's Field objects are distinct from the VCL field objects of its ADO dataset component. The OnWillChangeField event is purely a Recordset object event and independent of any VCL field change events.


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!