Exception: Timeout expired

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dean Slindee

    #1

    Exception: Timeout expired

    "The timeout period elapsed prior to completion of the operation or the
    server is not responding".
    ExceptionType: System.Data.Sql Client.SqlExcep tion
    Method: OnError

    I am getting the above error message when calling a long running stored
    procedure from a VS2005 WinForm application. Using Windows 2000 OS with SQL
    Server 2000, ADO.NET, Framework 2.0. The stored procedure just takes some
    time to build a lot of tables in SQL Server. To be a little more precise,
    the one stored procedure calls four more stored procedures (doubt it
    matters, but just in case...)

    So, my question is this: is there a setting in VS2005 or SQL Server that I
    can turn off or extend so that this timeout is disabled?

    Thanks in advance.
    Dean Slindee


  • Stephany Young

    #2
    Re: Exception: Timeout expired

    Set the CommandTimeOut property of the SqlCommand object to whatever you
    need.


    "Dean Slindee" <slindee@charte r.netwrote in message
    news:CMvBh.178$ vg7.100@newsfe0 5.lga...
    "The timeout period elapsed prior to completion of the operation or the
    server is not responding".
    ExceptionType: System.Data.Sql Client.SqlExcep tion
    Method: OnError
    >
    I am getting the above error message when calling a long running stored
    procedure from a VS2005 WinForm application. Using Windows 2000 OS with
    SQL Server 2000, ADO.NET, Framework 2.0. The stored procedure just takes
    some time to build a lot of tables in SQL Server. To be a little more
    precise, the one stored procedure calls four more stored procedures (doubt
    it matters, but just in case...)
    >
    So, my question is this: is there a setting in VS2005 or SQL Server that
    I can turn off or extend so that this timeout is disabled?
    >
    Thanks in advance.
    Dean Slindee
    >

    Comment

    • Michel Posseth  [MCP]

      #3
      Re: Exception: Timeout expired

      The standard time out is 20 seconds , so you need to high up the command
      time out to the required value

      regards

      Michel


      "Dean Slindee" <slindee@charte r.netschreef in bericht
      news:CMvBh.178$ vg7.100@newsfe0 5.lga...
      "The timeout period elapsed prior to completion of the operation or the
      server is not responding".
      ExceptionType: System.Data.Sql Client.SqlExcep tion
      Method: OnError
      >
      I am getting the above error message when calling a long running stored
      procedure from a VS2005 WinForm application. Using Windows 2000 OS with
      SQL Server 2000, ADO.NET, Framework 2.0. The stored procedure just takes
      some time to build a lot of tables in SQL Server. To be a little more
      precise, the one stored procedure calls four more stored procedures (doubt
      it matters, but just in case...)
      >
      So, my question is this: is there a setting in VS2005 or SQL Server that
      I can turn off or extend so that this timeout is disabled?
      >
      Thanks in advance.
      Dean Slindee
      >

      Comment

      Working...