Is using the .NET DataAdapter's batch insert features any more efficient, as far as DB round-trips, compared to using DbCommand.ExecuteNonQuery() in a loop?
Coming from the Java world, I was hoping to find something similar to it's batch abilities where multiple SQL commands are sent to the database and executed in one operation. When monitoring the database server, I see the DataAdapter making one execute per insert.
I've read a few topics that use the SqlBulkCopy but that's only going to work for MS Sql Server.
Thanks!
The DataAdapter has a UpdateBatchSize property. Setting the UpdateBatchSize to a positive integer value causes updates to the database to be sent as batches of the specified size.
Hope this helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With