现在我尝试从Winform执行select语句从SQL Server DB获取大量行,需要60秒,然后成功检索数据。在另一个环境中,我在30秒后超时异常。
我在查询中不使用Command.CommandTimeout; 是否存在SQL配置或网络配置问题?!
答案 0 :(得分:-2)
追加'超时= 60;'在web.config文件中的连接字符串中。
例如:
"Data Source=**;Initial Catalog=**;Timeout=60;Persist Security Info=True;User ID=**;Password=**"