Timeout expired超时问题
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
客户端在使用一段时间之后,在用数据集更新的时候就出现这样的错误。重器SQL服务之后问题解决。
我把SqlCommand.CommandTimeout 和 SqlConnection.ConnectionTimeout 的值改成0之后,在更新的时候程序半天也没响应。
[解决办法]
里面存在两种超时情况,一种是连接延时 Connection.ConnectionTimeout=30 (默认)
一种命令延时 Command.ConnectionTimeout = 15 (默认)
只需改大就行了