SQL Server在30秒后执行命令超时异常

时间:2015-04-19 10:49:30

标签: c# .net sql-server visual-studio-2010

现在我尝试从Winform执行select语句从SQL Server DB获取大量行,需要60秒,然后成功检索数据。在另一个环境中,我在30秒后超时异常。

我在查询中不使用Command.CommandTimeout; 是否存在SQL配置或网络配置问题?!

1 个答案:

答案 0 :(得分:-2)

追加'超时= 60;'在web.config文件中的连接字符串中。

例如:

"Data Source=**;Initial Catalog=**;Timeout=60;Persist Security Info=True;User ID=**;Password=**"
相关问题