|
AnyDAC
|
Use the AbortJob method to abort current dataset operation.
|
Parameters |
Description |
|
AWait: Boolean = False |
If True, then caller will wait until a current operation will be terminated. |
The AbortJob method aborts one of the following dataset operations:
After AbortJob call dataset state will be Active=False and Prepared=True for Open/ExecSQL/Execute. And Active=True for Fetch. The AbortJob method must be called from the other thread, than where a operation is performing.
procedure AbortJob(AWait: Boolean = False);
ADQuery1.ResourceOptions.CmdExecMode := amAsync;
ADQuery1.Open('select OrderID, count(*) from "Order Details" group by OrderID');
ADQuery1.AbortJob(True);|
What do you think about this topic? Send feedback!
|