从C#解决方案运行时出现超时错误 [英] Time out Error While running from C# Solution

查看:246
本文介绍了从C#解决方案运行时出现超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在尝试从解决方案更新数据库,我已将超时值设置为180.但它继续给出以下内容问题



超时已过期。在操作完成之前经过的超时时间或服务器 没有响应。





但是当我在SQL SERVER 2008 R2 Sql查询中运行相同的东西时它会在24秒内完成。







我尝试将超时设置为0,180甚至7200也是

我确认所有打开的连接都已关闭





关于这个问题的任何建议?

解决方案

在你的一些选择查询之后添加选项(重新编译),让我知道是否帮助

Hi All,

I am trying to update the database from the solution and I have set the time out value to 180. But it keeps on giving the below issue

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.



However when I run the same thing in SQL SERVER 2008 R2 Sql query it completes in 24 seconds.



I tried setting timeout to "0", 180 and even 7200 also
I verified all the connections open are closed


Any suggestions on the issue?

解决方案

add option(recompile) after some of your select queries, let me know if that helps.


这篇关于从C#解决方案运行时出现超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆