Data.Win.ADODB.TCustomADODataSet.OnWillChangeRecord

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnWillChangeRecord: TWillChangeRecordEvent read FOnWillChangeRecord write FOnWillChangeRecord;

C++

__property TWillChangeRecordEvent OnWillChangeRecord = {read=FOnWillChangeRecord, write=FOnWillChangeRecord};

Properties

Type Visibility Source Unit Parent
event published
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Occurs before a record in the recordset is changed.

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.

See Also