long running query...

  • Thread starter Thread starter eNathan
  • Start date Start date
E

eNathan

I'm sure this has been discussed before...

I have a query that moves a large amount of data from one db to another and
takes between 20-25 seconds. This causes a timeout error. With ADO.NET &
ASP.NET, how can I fire a stored procedure and let it run asynchronously? I
don't care to wait for it to finish.
By the way I'm using the Data Access Application Block. TIA
 
Check this out



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim NewThread As Thread = New Thread(AddressOf GeneratePrimeNumbers)

' sets priority

NewThread.Priority = ThreadPriority.Lowest

' executes thread

NewThread.Start()

Response.Redirect("results1.aspx")

'Dim conn As OleDb.OleDbConnection

End Sub

Public Sub GeneratePrimeNumbers()

What ever code that takes a long time

End Sub
 
Back
Top