Karatas, FERHAT
I would love to change the world, but they won't give me the source code!
Batch Updates in ADO.NET 2.0
30.8.2006 01:11:49 - Filed under : Ado.net
ADO.NET 2.0 has introduced the concept of Batch Updates, which allows you to designate the number of commands sent to the database at a given time.  If used correctly, this can increase the performance of your data access layer by reducing the number of roundtrips to the database.
When you updated a database using the DataAdapter in .NET 1.1 each command was sent to the database one at a time.  This caused a lot of roundtrips to the database.
The DataAdapter has an UpdateBatchSize Property that allows you to set the number of commands that will be sent to the database with each request.
  • UpdateBatchSize = 1, disables batch updates
  • UpdateBatchSize = X where X > 1, sends x statements to the database at a time
  • UpdateBatchSize = 0, sends the maximum number of statements at a time allowed by the server
using (OracleCommandBuilder cm = new OracleCommandBuilder(da))
  da.UpdateBatchSize = 0;
PS. Oracle supports this features in Oracle Data Provider for .NET Production

Related Terminology : Batch Update, ADO.NET 2.0, ODP.NET Release
with 0 comments

What do you think ?
Security Code 4944
Check S. Code
Home Page