StrataFrame Forum

ES Timeout

http://forum.strataframe.net/Topic32229.aspx

By Danny Doobay - 10/17/2013

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?

By Edhy Rijo - 10/17/2013

Hi Danny,

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

SqlCommand.Timeout = 0
By StrataFrame Team - 10/17/2013

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.
By StrataFrame Team - 10/17/2013

Edhy beat me to it by a few seconds.
By Danny Doobay - 10/17/2013

Thanks guys.