Click here to Skip to main content
14,448,968 members
Rate this:
Please Sign up or sign in to vote.
See more:
i have one sql query...which i executes in my c# windows application... using cmd.executeNonQuery();
and this cmd.executeNonQuery(); query takes executes in half or a minute time....
i want to show user on screen....the progress bar....with execution progress....
is that possible...how i will do that...
Posted
Comments
Alexander Sharykin 27-Feb-14 0:39am
   
if you execute a stored procedure or a function in this command, it is possible to organize a feedback and update progress in your application
but it won't work in case of a single update or delete query
Member 13116309 11-Apr-17 11:31am
   
how can i organize the feedback when i execute a stored procedure, which gives no output?
Rate this:
Please Sign up or sign in to vote.

Solution 1

Check the following articles and implement in your project.

1. how to use progressbar control in windows application using c#.net[^]
2. ProgressBar[^]
Rate this:
Please Sign up or sign in to vote.

Solution 2

sir, actually at the time of retrieving your data back you can't as it is unknown how much time it will take (depends on database). But at time of filling you can do so like this
Progressbar1.Maximum = Dt.Rows.Count;//Dt is your DataTable
for(int i=0;i<dt.rows.count;i++)>
{
    //Do Work
    Progressbar1.Value = i + 1;
}
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100