RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TADOCommand.Cancel Method

Halts execution of an ADO command.

Pascal
procedure Cancel;
C++
__fastcall Cancel();

Call Cancel abort the execution of a command executed by the command component. To use Cancel to abort a command, the command by have been executed asynchronously (the eoAsyncExecute TExecuteOption must have been used). If the command is not asynchronous an exception is raised. Use the command component's ExecuteOptions to specify that a command is executed asynchronously.

Note: To successfully cancel a command, Cancel must be called before the number of seconds specified in CommandTimeout have expired.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!