<< Click to Display Table of Contents >> AdoRecordSetEvents:WillChangeRecord() |
![]() ![]() ![]() |
Note |
Please note that event handling is not supported in the current version of Xs2Ado |
Purpose
The WillChangeRecord event is called before one or more records (rows) in the Recordset change.
METHOD WillChangeRecord (lReason, lRecords, lStatus, oRecordSet ) CLASS AdoRecordSetEvents
lReason An EventReasonEnum value that specifies the reason for this event
lRecords A Long value that indicates the number of records changing (affected).
lStatus An AdoEventStatusEnum status value.
oRecordSet A Recordset object. The Recordset for which this event occurred
The lStatus parameter is set to adStatusOK if the operation that caused the event was successful. It is set to adStatusCantDeny if this event cannot request cancellation of the pending operation.
Before WillChangeRecord returns, set this parameter to adStatusCancel to request cancellation of the operation that caused this event.
A WillChangeRecord event may occur for the first changed field in a row due to the following Recordset operations: Update, Delete, CancelUpdate, AddNew, UpdateBatch, and CancelBatch. The value of the Recordset CursorType determines which operations cause the events to occur.
During the WillChangeRecord event, the Recordset Filter property is set to adFilterAffectedRecords. You cannot change this property while processing the event
AdoRecordSetEvents, AdoEventReasonEnum, AdoEventStatusEnum