vb.net - DataAdapter update method progress status -


vb2010 using access2007 backend. creating dataset , adding several datatables , populating them. tables have small amount of records 1 can have million records. when issue .update command, there way status of it's @ can let user know x% done updating?

it works great app hangs while doing update.

rowsupdated = danewparts.update(dsinventory, "newparts") 

the oledbdataadapter has 2 events called rowupdated , rowupdating can use receive notification when row has been updated or before update event.

addhandler danewparts.rowupdated, new oledbrowupdatedeventhandler(addressof onrowupdated)  sub onrowupdated(byval sender object, byval args oledbrowupdatedeventargs)    ..... end sub 

this first part of problem, need know how many rows updated when start operation. obtained calling getchanges on datatable updating

dim count integer dim changeddata = dsinventory.tables("newparts").getchanges() if changeddata isnot nothing    count = changeddata.rows.count end if 

now build progress bar


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -