Phương pháp hủy ADO


❮ Tham chiếu đối tượng lệnh hoàn chỉnh

Phương thức Cancel hủy bỏ việc thực thi một lệnh gọi phương thức.

Phương thức Hủy bỏ các tác vụ khác nhau cho từng đối tượng. Bảng dưới đây cho thấy tác vụ nào bị hủy khi phương thức này được gọi:

Object Cancelled task
Command Execute.

Note: The Options parameter of the Execute method must be set to adAsyncExecute or adAsyncFetch, before the Cancel method is called, otherwise a run-time error will occur

Connection Execute or Open.

Note: The Options parameter of the Open method must be set to adSyncConnect, or the Options parameter of the Execute method be set to adAsyncExecute or adAsyncFetch, before the Cancel method is called, otherwise a run-time error will occur

Record CopyRecord, DeleteRecord, MoveRecord, or Open

Note: The Options parameter of the Execute method must be set to adAsyncExecute or adAsyncFetch, before the Cancel method is called, otherwise a run-time error will occur

Recordset Open
Stream Open

Cú pháp

object.Cancel

❮ Tham chiếu đối tượng lệnh hoàn chỉnh