Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
AddToBatch Method

DbDataAdapter.AddToBatch Method

Adds a IDbCommand to the current batch.

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)

'Declaration
Protected Overridable Function AddToBatch ( _
	command As IDbCommand _
) As Integer

Parameters

command
Type: System.Data.IDbCommand

The IDbCommand to add to the batch.

Return Value

Type: System.Int32
The number of commands in the batch before adding the IDbCommand.

ExceptionCondition
NotSupportedException

The adapter does not support batches.

In DbDataAdapter, this method throws NotSupportedException. Classes that inherit from DbDataAdapter override this method to provide support for batches.

Notes to Implementers

This method is protected and is designed for use by a .NET Framework data provider.

If a class that inherits from DbDataAdapter supports batches, that class overrides this method to allow users to add a command to a batch.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft