CommandTimeout (overridden)
Namespace:
System.Data.SqlClient
Assembly:
System.Data (in system.data.dll)
VB.NET
Public
Overrides Property CommandTimeout As
String
C#
public
override string CommandTimeout { get; set;
}
Gets or sets the wait time before terminating the attempt
to execute a command and generating an error.
It represents the time in seconds to wait for the command
to execute. The default is 30 seconds. A value of 0
indications no limit, and should be avoided in a
CommandTimeout because an attempt to execute a command will
wait indefinitely.
CommandTimeout has no effect when the command is executed
against a context connection (a SqlConnection opened with
"context connection=true" in the connection string).
This property is the cumulative time-out for all network
reads during command execution or processing of the
results. A time-out can still occur after the first row is
returned, and does not include user processing time, only
network read time.
Example: How to set the CommandType
property