Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Why not just change the connection timeout property? Your doing an update
statement, which could take various amounts of time depending on your server
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.
"Gary" <email@example.com> wrote in message
> I am developing a .NET web application. We are using SQL 2000. I am
> 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
> 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
> 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.
|All times are GMT. The time now is 11:38 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.