Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- From: amy.yerks@xxxxxxxxx
- Date: 29 Sep 2006 11:55:00 -0700
Thats the best solution i have heard yet and ive been looking around
all day trying to figure this out. thanks! i can execute a simple SP
to store the params and then run the other to kick off the job.
David Browne wrote:
<amy.yerks@xxxxxxxxx> wrote in message
news:1159551250.404701.243660@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a small ASP.NET 2.0 application that needs to be able to kick
off a long stored procedure (for importing and processing tables ) and
then allow the user to continue with the session, perform other tasks,
and log out without having to wait for the SP to complete. I read the
following article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/async2.asp
This looks very promising but I could not figure out what would happen
to the thread if the user logged out before it completed. The stored
procedure could take several hours depending on the parameters selected
so I need the command to be independant of the web Session. Will it
keep running or die when the user logs out? If it dies, can anyone
suggest a way to set it up so it will run until complete?
Several hours is way too long for Asyncronous Commands or background
threads. If nothing else, the applciation may bounce in that time, in which
case the database server will abort the batch.
If this is SQL Server, perhaps you can set up a SQL Agent job and kick it
off with the sp_start_job stored procedure. The user can check the status
periodically, but the execution won't depend on the web server or the user
hanging around that long.
David
.
- References:
- ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- From: amy . yerks
- Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- From: David Browne
- ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- Prev by Date: Re: Calling Oracle proc from C# - must I pass in a cursor?
- Next by Date: Re: Getting Oracle Error
- Previous by thread: Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- Next by thread: Re: ADO.NET 2.0 Asynchronous Command Execution: Independant of Web Session?
- Index(es):
Relevant Pages
|
Loading