Is there any difference between SqlCommand.CommandTimeout
and SqlConnection.ConnectionTimeout
in .NET?
ConnectionTimeout
specifies the duration to wait before timing out when attempting to open an SqlConnection
. It is relevant to the Connection.Open()
command.
while
SqlCommand.CommandTimeout
specified the duration for an SqlCommand to wait before timing out. This happens after a connection has been opened and one of the ExecuteXXX
methods have been called on the Command object.