FireDAC.Stan.Option.TFDResourceOptions.CmdExecMode
Delphi
property CmdExecMode: TFDStanAsyncMode read GetCmdExecMode
C++
__property Firedac::Stan::Intf::TFDStanAsyncMode CmdExecMode = {read=GetCmdExecMode, write=SetCmdExecMode, stored=IsCEMS, default=0};
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDResourceOptions |
Description
Controls the DBMS action execution mode.
Use the CmdExecMode property to control the DBMS action execution mode, at first its synchronism:
Mode |
Description |
|
The calling thread and GUI are blocked until an action will be finished. |
|
The calling thread is blocked until an action will be finished. The GUI is not blocked. |
|
The calling thread and GUI are blocked until an action will be finished. FireDAC shows the dialog allowing to cancel an action. |
|
The calling thread and GUI are not blocked. The called method will return immediately. |
The default value is amBlocking
. This property controls the synchronism of the following methods:
- TFDDataSet.Open, TFDCustomCommand.Open
- TFDDataSet.Execute, TFDCustomCommand.Execute
- Fetching in TFDDataSet, TFDCustomCommand.Fetch
If the mode is amNonBlocking
, then the application continues to process GUI messages, but it ignores mouse and keyboard events.
If the mode is amCancelDialog
, then the application should include the TFDGUIxAsyncExecuteDialog component into any form or data module. If it is not included, then an exception will be raised.
The Cancel button of the dialog allows to terminate the current action. If the DBMS does not allow to cancel an action, then the button will be hidden.
If the mode is amAsync
, the application can get a notification about the termination of the action by using the appropriate event handler or callback.
Class |
Method |
Event |
TFDDataSet |
Open |
AfterOpen event |
|
Execute |
AfterExecute event |
TFDCustomCommand |
Open |
AfterOpen event |
|
Execute |
AfterExecute event |
|
Fetch |
AfterFetch event |
The application can control action timeout by setting the CmdExecTimeout property.
See Also
- Asynchronous Execution
- FireDAC.Stan.Option.TFDResourceOptions.CmdExecTimeout
- FireDAC.Comp.Client.TFDRdbmsDataSet.Open
- FireDAC.Comp.Client.TFDCustomCommand.Open
- FireDAC.Comp.DataSet.TFDDataSet.Execute
- FireDAC.Comp.Client.TFDCustomCommand.Execute
- FireDAC.Comp.Client.TFDCustomCommand.Fetch
Samples
- FireDAC TFDQuery Async sample