首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

Timeout expired超时有关问题

2012-01-22 
Timeout expired超时问题Timeout expired. The timeout period elapsed prior to completion of the opera

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 (默认)
只需改大就行了

热点排行