System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion

Discussion in 'ASP .Net' started by Ersin Gençtürk, Apr 22, 2005.

  1. we are getting :

    System.Web.HttpUnhandledException: Exception of type
    System.Web.HttpUnhandledException was thrown. --->
    System.Data.SqlClient.SqlException: Timeout expired. The timeout period
    elapsed prior to completion of the operation or the server is not
    responding.
    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection
    connection, CommandType commandType, String commandText, SqlParameter[]
    commandParameters)
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String
    connectionString, CommandType commandType, String commandText,
    SqlParameter[] commandParameters)

    errors , we are using sqldata access block 2.0 I have heard about some bugs
    with connection opening / closing.I have changed the source code and put
    connection close codes , but It didn't worked well.Is there any workaround
    for this or any patch do you have ?
     
    Ersin Gençtürk, Apr 22, 2005
    #1
    1. Advertising

  2. Ersin Gençtürk

    jmohanty2006

    Joined:
    Sep 25, 2007
    Messages:
    1
    System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior

    While declaring the command object set the timeout property to some higher value.U can also set it it to 0 i.e. infinity.
    SqlCommand cmd = new SqlCommand();
    cmd.CommandTimeout=0;
     
    jmohanty2006, Sep 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Johnson
    Replies:
    0
    Views:
    3,777
    Bob Johnson
    Aug 7, 2003
  2. Guoqi Zheng
    Replies:
    4
    Views:
    13,037
    Guoqi Zheng
    Jun 3, 2004
  3. Karl Seguin
    Replies:
    1
    Views:
    5,556
    Arun M
    Sep 4, 2007
  4. Karl Seguin
    Replies:
    0
    Views:
    598
    Karl Seguin
    Apr 14, 2005
  5. VB Programmer
    Replies:
    4
    Views:
    8,255
    bunty
    Jan 24, 2006
Loading...

Share This Page