How to run a progress-bar through an insert query?
- by Gold
I have this insert query:
try {
Cmd.CommandText = @"INSERT INTO BarcodTbl SELECT * FROM [Text;DATABASE=" + PathI + @"\].[Tmp.txt];";
Cmd.ExecuteNonQuery();
Cmd.Dispose();
} catch (Exception ex) {
MessageBox.Show(ex.Message);
}
I have two questions:
How can I run a progress-bar from the beginning to the end of the insert?
If there is an error, I got the error exception and the action will stop - the query stops and the BarcodTbl is empty. How I can see the error and allow the query to continue filling the table?