Send feedback on this topic.
Teradata.Client.Provider
CommandTimeout Property (TdCommand)



Teradata.Client.Provider Namespace > TdCommand Class : CommandTimeout Property
Gets or sets the wait time before aborting the execution of the command.
Syntax
'Declaration
 
Public Overrides NotOverridable Property CommandTimeout As Integer
'Usage
 
Dim instance As TdCommand
Dim value As Integer
 
instance.CommandTimeout = value
 
value = instance.CommandTimeout
public override int CommandTimeout {get; set;}
public:
property int CommandTimeout {
   int get() override;
   void set (    int value) override;
}

Property Value

The time to wait for the command to execute. The default value is 30 seconds.
Exceptions
ExceptionDescription
The property value is less than 0.
The CommandTimeout property was changed while the command was in execute state.
The TdCommand is disposed.
Remarks

The CommandTimeout property represents the amount of time in seconds that the .NET Data Provider waits for a response from Teradata. If the request is not processed within the specified CommandTimeout the request is aborted and the transaction is rolled back. A zero value indicates that the .NET Data Provider should wait indefinitely for the SQL statement to execute.

The default CommandTimeout may be changed through support in our application configuration file Application Configuration File CommandTimeout.

With the introduction of Redrive and Recoverable Network Protocol, the CommandTimeout will determine the Application Configuration File RecoveryTimeout value while reconnecting a session. The following table applies while the TdConnectionStringBuilder.Recovery is set to Redrive, Reconnect or Default and the database has enabled Recoverable Network Protocol.

CommandTimeout RecoveryTimeout
0 The RecoveryTimeout will be supplied during reconnection.
Non-zero

The RecoveryTimeout will be supplied during reconnection when the TdConnectionStringBuilder.RecoveryCommandTimeoutOverride is true. This is the default value for the RecoveryCommandTimeoutOverride.

The non-zero CommandTimeout will not be extended by the RecoveryTimeout when RecoveryCommandTimeoutOverride is false. Any reconnection efforts will utilize the remaining time from the CommandTimeout.

Requirements

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdCommand Class
TdCommand Members
Period Type Arithmetic Operations: UNTIL_CHANGED