ES Timeout


Author
Message
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
I have a stored procedure in SQL server which will run for a while. When I call the stored procedure from the application ES returning "Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding"

Dim SqlCommand As New SqlCommand
Try  
SqlCommand.CommandText = "MyProcedure"
SqlCommand.CommandType = CommandType.StoredProcedure
Me.ExecuteNonQuery(SqlCommand)Catch ex As ExceptionApplicationEventLog.WriteException(ex, False)
End Try

What can I do?


Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Danny,

Set the timeout to the connection to 0 to allow your sp to run properly.

SqlCommand.Timeout = 0


Edhy Rijo

StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can set the SqlCommand.Timeout.  The default value is 30, which will cause the SQL Server connector to throw an exception if the command hasn't been completed in 30 seconds.  You can set it to 0, which means "no timeout".  Or you can set it to any number of seconds that you want.
Edited 11 Years Ago by Ben Chase
StrataFrame Team
S
StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)StrataFrame Developer (6.3K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Edhy beat me to it by a few seconds.
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
Thanks guys.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search