ADO ยกเลิกวิธี การแบทช์
❮ การอ้างอิงออบเจ็กต์ชุดระเบียนที่สมบูรณ์
วิธี CancelBatch จะยกเลิกการอัพเดตชุดงาน ชุดระเบียนต้องอยู่ในโหมดอัปเดตเป็นชุดเมื่อเรียกใช้เมธอดนี้
เนื่องจากคุณไม่ทราบว่าระเบียนปัจจุบันจะเป็นอย่างไรหลังจากเรียกคุณสมบัตินี้ คุณจะต้องย้ายไปยังระเบียนที่รู้จัก ตัวอย่างเช่น คุณสามารถเรียกใช้เมธอด MoveFirst หรือ MoveLast หลังจากการเรียกใช้เมธอดนี้
หากวิธีนี้ล้มเหลว ผู้ให้บริการจะไม่หยุดการดำเนินการ แต่จะส่งคำเตือนไปยังการรวบรวมข้อผิดพลาด
ไวยากรณ์
objRecordset.CancelBatch affectrec
Parameter | Description |
---|---|
affectrec | Optional. An AffectEnum value that indicates which records this method will affect |
ค่า 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 |
❮ การอ้างอิงออบเจ็กต์ชุดระเบียนที่สมบูรณ์