Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server i

Discussion in 'ASP .Net' started by Bob Johnson, Aug 7, 2003.

  1. Bob Johnson

    Bob Johnson Guest

    Gary

    Why not just change the connection timeout property? Your doing an update
    statement, which could take various amounts of time depending on your server
    load.

    Just set the connection timeout property to something insane like 3000
    seconds <--- note you need to make ABSOLUTELY sure that your sql statements
    are properly formatted before you ever do this.

    Ciao

    Bob J.

    "Gary" <> wrote in message
    news:...
    > I am developing a .NET web application. We are using SQL 2000. I am

    getting
    > this Exception message while executing a query.
    >
    > "Timeout expired. The timeout period elapsed prior to completion of the
    > operation or the server is not responding."
    >
    > This query fails when I execute it for the first time. After ttat the

    query
    > works most of the times, but I still receive this message sometimes. I am
    > unable to find out why this occurs.
    >
    > This is query that is causing the timeout exception
    >
    > private const string SQL_UNASSIGN_TRAINING = "UPDATE tblAssignedTraining
    >
    > SET IsWaivedOff = 1 WHERE TrainingId = @TrainingId AND UserId = @UserId

    AND
    >
    > Status <> 4";
    >
    > The following is the database design for the tblAssignedTraining table.
    >
    > Status - Integer (can have value 1, 2, 3 or 4)
    >
    > TrainingId - Integer
    >
    > UserId - varchar(50)
    >
    > IsWaivedOff - Bit
    >
    > Any help would be highly appreciated.
    >
    > TIA,
    >
    > Gary
    >
    >
     
    Bob Johnson, Aug 7, 2003
    #1
    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. Guoqi Zheng
    Replies:
    4
    Views:
    13,093
    Guoqi Zheng
    Jun 3, 2004
  2. Ersin Gençtürk
    Replies:
    1
    Views:
    7,260
    jmohanty2006
    Sep 25, 2007
  3. VB Programmer
    Replies:
    4
    Views:
    8,278
    bunty
    Jan 24, 2006
  4. UJ
    Replies:
    1
    Views:
    9,244
    Hans Kesting
    Feb 10, 2006
  5. rutherf
    Replies:
    2
    Views:
    450
    rutherf
    Oct 28, 2006
Loading...

Share This Page