AnyDAC
ContentsIndexHome
PreviousUpNext
TADResourceOptions.CmdExecTimeout Property

Controls DBMS action execution timeout.

Group
Links

Use CmdExecTimeout property to control the DBMS action execution timeout. The value <= 0 means - no timeout. The default value is -1. The time is in milliseconds (0,001 sec). 

This property controls the following methods timeout:

  • TADDataSet.Open, TADCustomCommand.Open, IADPhysCommand.Open;
  • TADDataSet.Execute, TADCustomCommand.Execute, IADPhysCommand.Execute;
  • fetching in TADDataSet, TADCustomCommand.Fetch, IADPhysCommand.Fetch.
property CmdExecTimeout: LongWord;

Asynchronous Execution, CmdExecMode, TADDataSet.Open, TADCustomCommand.Open, IADPhysCommand.Open, TADDataSet.Execute, TADCustomCommand.Execute, IADPhysCommand.Execute, TADCustomCommand.Fetch, IADPhysCommand.Fetch

See demos:

  • AnyDAC\Samples\Comp Layer\TADQuery\ExecSQL\Async;
  • AnyDAC\Samples\Phys Layer\IADPhysCommand\Async.
// set timeout to 5 seconds
ADQuery1.ResourceOptions.CmdExecTimeout := 5000;
ADQuery1.ExecSQL;
What do you think about this topic? Send feedback!