Ado.net performance

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I am using System.Data.DataSet and System.Data.DataTable using vb.net
After creating the table structure(columns and setting primary key), i populate the datatable with around 2000 records
Next, i use select(filter as string) method of datatable to filter records and update fields of the selected record
When i call acceptchanges method, it takes a long time to update the table

Please post your suggestions

Thanks and Regards

Prasant
 
What are you calling AcceptChanges for? AcceptChanges Doesn't send updates
back to the database..it only changes the rowstate of the local dataset.
Hence call dataadapter.fill, do your selecting and modifying, call
acceptchanges and then close your app without calling update, nothing will
ever change in your db. (unless obviously someone/something else changes
it).
p2303 said:
Hello,

I am using System.Data.DataSet and System.Data.DataTable using vb.net.
After creating the table structure(columns and setting primary key), i
populate the datatable with around 2000 records.
Next, i use select(filter as string) method of datatable to filter records
and update fields of the selected record.
 
Back
Top