超时时间已到。在操作完成之前超时时间已过或服务器未响应。 (.Net SqlClient Data Provider)...

Is there any difference between SqlCommand.CommandTimeout andSqlConnection.ConnectionTimeout in .NET?

Yes. CommandTimeout is how long a single command can take to complete. ConnectionTimeout is how long it can take to establish a connection to the server to start with.

For instance, you may be executing relatively long-running queries - it's perfectly okay for them to take 10 minutes to complete, but if it took 10 minutes to make the connection to start with, you'd know that something was badly wrong.

转载于:https://www.cnblogs.com/xust/articles/2866479.html

你可能感兴趣的:(超时时间已到。在操作完成之前超时时间已过或服务器未响应。 (.Net SqlClient Data Provider)...)