We help IT Professionals succeed at work.

Asynchronous

bbkevin
bbkevin asked
on
Hi Experts,

I have very long stored procedure that require to running for few hours. The current situation is allow the user to start the stored procedure and check the status in the ASP.NET web application.

Current Items
- Web Page contains single START button only
- Stored Procedure named SP_Retrieve_Internet_Record_Monthly
- Table named tblStatus contains one varchar column named Status.

Some suggestion on the web say calling Web Services Asynchronously,
and other say using delegate.

If you can give some examples it will be greatly appreciated.
Comment
Watch Question

Hi bbkevin,

is there some reason that this process needs to be started by the user?  if, for example, it runs every day, you could create a scheduled task to run the stored procedure, and then generate a report, email, etc. that would notify the user when it is complete.

Author

Commented:
The user may not start the process because of bad weather such as earthquake, hurricane, tsunami, typhoon, cyclone...
Aaron JabamaniTechnical Architect
Commented:
Stored procedure running for few hours..It is going to time out from asp.net.  

All web methods by default comes with Asyn methods. In your asp.net application, the proxy object of your web service will have "Begin" prefixed to all the web methods in your web service.  All these Begin methods are suppport Asyn calls.

Author

Commented: