Data.Win.ADODB.TCustomADODataSet.OnWillChangeRecordset

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnWillChangeRecordset: TRecordsetReasonEvent read FOnWillChangeRecordset write FOnWillChangeRecordset;

C++

__property TRecordsetReasonEvent OnWillChangeRecordset = {read=FOnWillChangeRecordset, write=FOnWillChangeRecordset};

Properties

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

Description

Occurs before the recordset has changed.

Write an OnWillChangeRecordset event handler to take specific action before the dataset component's Recordset object is changed.

DataSet is the ADO dataset component that triggered the OnWillChangeRecordset 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 OnWillChangeRecordset event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. EventStatus will be esOK if the operation that triggered the event executed without error, esErrorsOccured if error occurred during execution of that operation, or esCancel if the operation was canceled.

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

See Also