RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomADODataSet.OnWillChangeRecord Event

Occurs before a record in the recordset is changed.

Pascal
property OnWillChangeRecord: TWillChangeRecordEvent;
C++
__property TWillChangeRecordEvent OnWillChangeRecord;

Write an OnWillChangeRecord event handler to take specific action just before a pending operation changes a row in the dataset component's recordset object. 

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

Reason indicates the type of change that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnWillChangeRecord event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange. 

RecordCount is the number of records that were changed. 

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

Note: : The OnWillChangeRecord event is purely a Recordset object event and independent of any VCL data change events.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!