progress when i am updating a table?

alim

Well-known member
Joined
Dec 12, 2005
Messages
89
Location
bangladesh
Programming Experience
3-5
Hey, can i show .. backgroundworker progress when i am updating a table..


VB.NET:
Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) _
		Handles BackgroundWorker1.DoWork

Adp.Update(Table)
End Sub

How can i show the process of updating records everytime.. .please help me .. urgent
 
You can't show the progress of an update operation on a database (you cannot show the progress of UPDATE table SET x = y WHERE ID BETWEEN 1 and 1000).

If youre trying to send 1000 rows to a database for update, then you should send them yourself, one at a time, using the TableAdapter.Update(DataRow) overload.
Then you can use this pseudocode:

VB.NET:
loop{
ta.Update(row)
bgw.ReportProgress(rownum/rowcount * 100)
}
 

Latest posts

Back
Top