progress bar and store procedures

fasttrack

New member
Joined
Jul 17, 2005
Messages
2
Programming Experience
1-3
Hi guys,

I 'd like to build a progress bar (VB.Net), showing the progress of a stored procedure started form a VB.net application.

Do you know how to build it or any resources to find useful informations?

Thank a lot
 
Retrieving data from a database using a DataAdapter is a synchronous operation, i.e. the call does not return until the entire operation is complete. There is no way to determine where the operation is up to. The only way to achieve what you want would be to perform one query to determine the number of rows in the result set and then another query to retrieve the rows using a DataReader. You could provide the user with an up-to-date progress but you would slow the operation down considerably by doing so. Probably the best thing you can do is simply display an animation in a seperate thread to imply to the user that something is happening. The ProgressBar has been improved in .NET 2.0 to provide this functionality out-of-the-box. You've seen never-ending progress bars like the one that appears as Windows is loading. The ProgressBar provides this functionality in .NET 2.0. For now, you can create something of your own, or there are a number of third-party controls that do this available off the web.
 
Back
Top