True DataControl 8.0 Reference > True DataControl Control > TData Control Events > WillChangeRecord Event |
WillChangeRecord Event
Occurs before the current row position changes.
TData_WillChangeRecord (ByVal adReason As EventReasonEnum, ByVal cRecords As Long, adStatus As EventStatusEnum)
Arguments: adReason is an ADO EventReasonEnum value that specifies the reason for this event. Its value can be adRsnAddNew, adRsnDelete, adRsnUpdate, adRsnUndoUpdate, adRsnUndoAddNew, adRsnUndoDelete, or adRsnFirstChange.
cRecords is always 1.
adStatus is an ADO EventStatusEnum status variable. When WillChangeRecord is called, this parameter is set to adStatusOK ,or to adStatusCantDeny, the latter means that 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.
The WillChangeRecord event is a standard ADO Recordset event fired by the TData control’s Recordset. For more information, see Using recordset events. As with any ADO recordset, this event occurs before one or more records (rows) in the recordset change.
The WillChangeRecord event may occur due to the following Recordset operations: Update, Delete, CancelUpdate, AddNew, UpdateBatch, and CancelBatch.
See Also