AnnaJames77
asked on
Stored Proc Progress bar
I have a stored proc that synchronises two db's. My question is when i call the stored proc from my application it shoukd show the status back to the user. something like a progress bar. when i googled i came through something called Background worker. can anyone one give an example how i can use it. or is there any other way.
>synchronises two db's.
How?
I think you would want to use a marquee style progressbar so that the stored procedure keeps running in the background but the UI is responsive so user is not frustrated.
http://www.youtube.com/watch?v=ZiVv_uPWOEs
How?
I think you would want to use a marquee style progressbar so that the stored procedure keeps running in the background but the UI is responsive so user is not frustrated.
http://www.youtube.com/watch?v=ZiVv_uPWOEs
ASKER
thankyou CodeCruiser. but how can we know that the stored proc has completed its excution???
"but how can we know that the stored proc has completed its excution"
returns a return value or writes an "i am completed" row into the db and you poll it
returns a return value or writes an "i am completed" row into the db and you poll it
ADO.NET Asynchronous SQL Calls
http://www.codeproject.com/KB/cs/ADOProgress.aspx
Easy incremental status updates for long requests
http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/
http://www.codeproject.com/KB/cs/ADOProgress.aspx
Easy incremental status updates for long requests
http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/
check the asynchronous ADO.Net methods from http://www.emoreau.com/Entries/Articles/2006/11/MARS-and-Asynchronous-ADONet.aspx
If you dont use asynchronous ADO.NET, how do you know currently that stored procedure has completed? All you do is that you move the current code in backgroundworker and add a progressbar on the form.
ASKER
Codecrusier can you pls let me know how to use the backgroundworker. When i googled too i got such an answer. but i donot know how to use it. In google got many answers but dint get one which uses a stored procedure with backgroundworker. CAn you help on this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How do you know how long your sp will run ?
What you perhaps can do is split the sp into several smallers (fe 5 pieces) and update the progressbar each time when you call the next one.
How To Update Controls Using BackgroundWorker in VB.NET
http://vbnotebookfor.net/2007/09/24/how-to-update-controls-using-backgroundworker-in-vbnet/