I have a method that calls a long running sp from an ASP.NET page. What I want to be able to do is start executing the sp, and continue with any other statments that may need to be executed in the page. I also require the sp to continue running even after the web app closes. I don't need any results returned to the web page as I'm writing to a table in the database on completion.
What would be the best way to handle this.
Including the code that calls the sp.
Dim retValue As Integer = 0
Using connection As New SqlClient.SqlConnection(connectString)
Dim command As SqlClient.SqlCommand = connection.CreateCommand
command.CommandType = CommandType.StoredProcedure
command.CommandText = "LongProcess"
command.CommandTimeout = 18000 ' 5 hours
command.Parameters.Add("@Descrip", SqlDbType.VarChar).Value = descrip
retValue = command.ExecuteNonQuery
Catch ex As Exception