O'Reilly logo

Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition by David Sceppa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Batch Queries

In version 1.0 of the .NET Framework, the various DataAdapter classes could submit only one pending change at a time to your database. In some ways, this was a step backward from ADO "Classic," which let you submit pending changes to the database in batches.

Version 2.0 of ADO.NET addresses this scenario through the UpdateBatchSize property on the various DataAdapter classes. By default, this property is set to 1, which will cause the DataAdapter to submit pending changes to the database one row at a time. If you want to submit pending changes to the database in batches, set the UpdateBatchSize property to the desired batch size. If you set the UpdateBatchSize property to 0, the DataAdapter will submit all rows in a single batch. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required