If you're reading this blog you're probably familiar with ADO.Net and it's SqlCommand object.
Now this SqlCommand object has a CommandTimeout property that specifies the number of seconds
after which the command will terminate. The default value is 30.
Now we get to the SqlConnection and the connection string. in the connection string you can specify
Connection Timeout = numberOfSeconds
after which the connection timeouts.
We also have to set the SqlConnection object to the SqlCommand.Connection property.
Nothing special so far.
Now my question is:
If we set the Connection Timeout in our connection string to higher value than the SqlCommand.CommandTimeout's is,
WHY DOESN'T the SqlCommand.CommandTimeout get set to that higher value???
I really can't think of a good reason.
OK, I can... :)