Click here to Skip to main content
15,167,925 members
Please Sign up or sign in to vote.
5.00/5 (1 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?

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;
}
   
Check the following articles and implement in your project.

1. how to use progressbar control in windows application using c#.net[^]
2. ProgressBar[^]

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900