【问题标题】:Connection time out error while trying to update using sql server尝试使用 sql server 更新时出现连接超时错误
【发布时间】:2015-08-24 05:28:33
【问题描述】:

我正在使用 Sql server 2012 64bitasp.net

当我触发更新查询时,sql server 给出特定行的连接超时错误。
它正在为其他一些行工作。我无法理解这个问题。

【问题讨论】:

  • 在这里发布您的查询..
  • 请提供查询失败的具体步骤
  • 您可能正在锁定行,因此您面临死锁。
  • 桌子上有触发器吗?
  • 这是一篇很好的文章,可以帮助您入门。 spaghettidba.com/2015/04/24/…

标签: asp.net sql-server-2012


【解决方案1】:

SqlCommandCommandTimeOut 属性设置为0
使用以下行:

SqlCommand com=new SqlCommand("Your Query","Your Connection");
com.CommandTimeout = 1;

【讨论】:

    猜你喜欢
    • 2017-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多