Partager via


Cancel Method

Cancels execution of a pending, asynchronous method call.

Syntax

object.Cancel

Remarks

Use the Cancel method to terminate execution of an asynchronous method call (that is, a method invoked with the adAsyncConnect, adAsyncExecute, or adAsyncFetch option).

The following table shows what task is terminated when you use the Cancel method on a particular type of object.


If object is a
The last asynchronous call to this method is terminated
Command Execute
Connection Execute or Open
Record CopyRecord, DeleteRecord, MoveRecord, or Open
Recordset Open
Stream Open

See Also

Visual Basic Example | VBScript Example | Visual C++ Example | Visual J++ Example

Cancel Method (RDS) | CancelBatch Method | CancelUpdate Method | CancelUpdate Method (RDS) | Execute Method (ADO Command) | Execute Method (ADO Connection) | Open Method (ADO Connection) | Open Method (ADO Recordset)

Applies To: Command Object | Connection Object | Record Object | Recordset Object | Stream Object