Threading?

  • Thread starter Thread starter James
  • Start date Start date
J

James

Simple concept. I have a stored procedure call that takes a very long time
to run. This is a necessary evil. While this procedure is running, it does
a simple update to a table with a % complete. I can call another stored
procedure to return the % complete and update it to the end user. The only
probably is the execution.

If I have a button which fires the initial long running proc call, how do I
get another call to run while that procedure is running, that will simply
execute a stored procedure call and return a % complete onto a label, on the
same page? Is this possible?

ASP.NET 1.1.4322 w/VB.NET

Thanks a million
 
For 1.1 you would be well advised to absorb this article by MVP Fritz Onion
on threading in asp.net 1.1, as he also covers Async threading

http://msdn.microsoft.com/msdnmag/issues/03/06/Threading/default.aspx

Its much improved in 2.0

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/async2.asp

However, if you expect to see a percentage update in your client then your
into the realm of client callbacks or iframe hacks. Given you are stating
1.1 as your framework version then its not an easy task as your expecting
client updates from server processes and thats not how web requests work.
If it was me, I would do the click to kick off your server process async and
return a page with status check that simply refreshes.

Regards

John Timney (MVP)
 
Back
Top