I have a progress bar on my program and I am trying to add value to it after each "DataTable" has been processed, however it only updates after everything is done.
here is the code:
int c = 0;
OdbcConnection cn = openOdbcDB();
foreach(DataSet ds in allDataSets)
{
foreach(DataTable dt in ds.Tables)
{
foreach (DataRow dr in dt.Rows)
{
insertIntoDatabaseCurrentRecord(dr);
}
}
pbMain.Value = pbMain.Value + (33 / totalFiles);
c++;
}
cn.Close();
cn.Dispose();
Is there a way to force the bar to show progress after each table is finished like it is finished? At the moment, I only see the progress once loops finish, I see the line go from empty to full. There are about 18000 records per DataTable, so I should be able to see it because it takes about a minute for it to process all the records.