ADO CancelBatch Method


❮ Tham chiếu đối tượng tập bản ghi hoàn chỉnh

Phương thức CancelBatch hủy cập nhật hàng loạt. Tập bản ghi phải ở chế độ cập nhật hàng loạt khi gọi phương thức này.

Vì bạn không biết bản ghi hiện tại sẽ là gì sau khi gọi thuộc tính này, bạn sẽ phải chuyển sang bản ghi đã biết. Ví dụ, bạn có thể gọi phương thức MoveFirst hoặc MoveLast, sau khi gọi phương thức này.

Nếu phương pháp này không thành công, nhà cung cấp sẽ không dừng việc thực thi, nhưng nó sẽ gửi cảnh báo đến Bộ sưu tập lỗi. 

Cú pháp

objRecordset.CancelBatch affectrec

Parameter Description
affectrec Optional. An AffectEnum value that indicates which records this method will affect

Giá trị AffectEnum

Constant Value Description
adAffectCurrent 1 Affects only the current record
adAffectGroup 2 Affects only records that satisfy the Filter setting (Filter must be set to a FilterGroupEnum value or an array of Bookmarks)
adAffectAll 3 Affects all records if there is no Filter. Affects only visible records in the current chapter if Filter is set to a string criteria. Affect all rows of the Recordset if Filter is set to a FilterGroupEnum value or an array of Bookmarks
adAffectAllChapters 4 Affects all records in all child Recordset, including those hidden by a currently applied filter

❮ Tham chiếu đối tượng tập bản ghi hoàn chỉnh