Cancel Method - ADO

Cancels execution of a pending, asynchronous Execute or Open method call.

Applies To

Command, Connection, Recordset

Required Files

msado15.dll
VC: adoint.h, adoid.h

Syntax

object.Cancel ()

Remarks

Use the Cancel method to terminate execution of an asynchronous Execute or Open method call (that is, the method was invoked with the adRunAsync option). Cancel will return a run-time error if adRunAsync was not used in the method you're trying to terminate.

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
Recordset Open t

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.