Display progress while inserting a lot of rows into database

  • Thread starter Thread starter Hvid Hat
  • Start date Start date
H

Hvid Hat

Hello

How would one go about displaying the progress while inserting a lot of rows
into a database (MS SQL Server). I've googled and found something about using
RowUpdating and RowUpdated on an SqlAdapter but I didn't find a good example.
Is this the way to go or are there other ways?

/ Hvid
 
Hvid said:
How would one go about displaying the progress while inserting a lot of rows
into a database (MS SQL Server). I've googled and found something about using
RowUpdating and RowUpdated on an SqlAdapter but I didn't find a good example.
Is this the way to go or are there other ways?

A loop that execute INSERT statements and updates a ProgressBar
seems the most obvious to me.

Arne
 
In addition to what Arne suggested, it would be even better to execute this
code in a separate thread to avoid freezing UI, e.g. in a BackgroundWorker.
 
Back
Top