FireDAC.Comp.Client.TFDAdaptedDataSet.AbortJob
| [–] Properties | |
|---|---|
| Type: procedure function
| |
| Visibility: public | |
| Source: FireDAC.Comp.Client.pas FireDAC.Comp.Client.hpp
| |
| Unit: FireDAC.Comp.Client | |
| Parent: TFDAdaptedDataSet | |
Delphi
procedure AbortJob(AWait: Boolean = False);
C++
void __fastcall AbortJob(bool AWait = false);
Description
Use the AbortJob method to abort the current dataset operation.
The AbortJob method aborts one of the following dataset operations:
- Open. The dataset is executing a DBMS command to open a cursor.
- ExecSQL / Execute. The dataset is executing a DBMS command.
- Fetch. The dataset is fetching rows from the cursor.
After a call to AbortJob, the Active state of the dataset is False and Prepared is True for Open/ExecSQL/Execute. The Active state is True for Fetch. The AbortJob method must be called from the other thread, than from where an operation is performed.
Example
FDQuery1.ResourceOptions.CmdExecMode := amAsync;
FDQuery1.Open('select OrderID, count(*) from "Order Details" group by OrderID');
FDQuery1.AbortJob(True);