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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top