ADO WillChangeRecordRecordChangeComplete 이벤트


❮ 완전한 레코드세트 개체 참조

WillChangeRecord 이벤트

WillChangeRecord 이벤트는 하나 이상의 레코드가 변경되기 전에 트리거됩니다.

참고: 이 이벤트가 반환되기 전에 status 매개변수를 adStatusCancel로 설정하여 이 이벤트를 일으킨 작업을 취소하거나 adStatusUnwantedEvent로 설정하여 후속 알림을 방지합니다.

RecordChangeComplete 이벤트

RecordChangeComplete 이벤트는 하나 이상의 레코드가 변경된 후에 트리거됩니다.

참고: 이 메서드가 반환되기 전에 상태 매개변수를 adStatusUnwantedEvent로 설정하여 후속 알림을 방지하세요.

참고: Update, Delete, CancelUpdate, AddNew, UpdateBatch 및 CancelBatch Recordset 작업 중 하나를 사용하여 레코드의 필드를 변경하면 WillChangeRecord 이벤트 또는 RecordChangeComplete 이벤트가 발생할 수 있습니다.

통사론

WillChangeRecord reason,numrec,status,objRs

RecordChangeComplete reason,numrec,objErr,status,objRs

Parameter Description
reason An EventReasonEnum value that specifies the reason for this event
numrec Indicates the number of records affected
status An EventStatusEnum value that indicates the status of the execution of the event
objErr The name of an Error object that describes the error if status is set to adStatusErrorsOccurred, otherwise it is not set
objRs The name of the Recordset Object that triggered this event

EventReasonEnum 값

Constant Value Description
adRsnAddNew 1 An operation added a new record
adRsnDelete 2 An operation deleted a record
adRsnUpdate 3 An operation updated an existing record
adRsnUndoUpdate 4 An operation reversed the update of a record
adRsnUndoAddNew 5 An operation reversed the addition of a new record
adRsnUndoDelete 6 An operation reversed the deletion of a record
adRsnFirstChange 11 An operation made the first change to a record

EventStatusEnum 값

Constant Value Description
adStatusOK 1 The operation that caused the event was successful
adStatusErrorsOccurred 2 The operation that caused the event failed
adStatusCantDeny 3 The operation that caused the event cannot be cancelled
adStatusCancel 4 The operation that caused the event is cancelled
adStatusUnwantedEvent 5 Prevents subsequent notifications before the event method has finished executing

❮ 완전한 레코드세트 개체 참조