by Dominic Zukiewicz
23. March 2010 09:45
I was working on a project in which the traffic had picked up significantly on a database. So in order to allow some of the longer queries to execute, I increased the SqlConnection time by changing the connection string: Connection Timeout=120 Great! We're done - aren't we? Well, no, we aren't. The problem is that although the SqlConnection.ConnectionTimeout has now been changed, the SqlCommand.CommandTimeout does not get affected and remains on the default 30 seconds. You will need to manually copy this value across to the CommandTimeout: SqlConnection conn = new SqlConnection ("M...
[More]