DbDataAdapter.InitializeBatching 方法

定义

初始化 DbDataAdapter 的批处理。Initializes batching for the DbDataAdapter.

protected:
 virtual void InitializeBatching();
protected virtual void InitializeBatching ();
abstract member InitializeBatching : unit -> unit
override this.InitializeBatching : unit -> unit
Protected Overridable Sub InitializeBatching ()

例外

该适配器不支持批处理。The adapter does not support batches.

注解

DbDataAdapter中,此方法将引发 NotSupportedExceptionIn DbDataAdapter, this method throws NotSupportedException. 继承自的类 DbDataAdapter 重写此方法以提供对批的支持。Classes that inherit from DbDataAdapter override this method to provide support for batches.

继承者说明

此方法是受保护的,由 .NET Framework 数据提供程序使用。This method is protected and is designed for use by a .NET Framework data provider.

如果从 DbDataAdapter 继承的类支持批处理,则该类将重写此方法。If a class that inherits from DbDataAdapter supports batches, that class overrides this method. 此方法为类提供了初始化支持批处理所需的任何资源的机会。This method gives the class the opportunity to initialize any resources necessary to support batching. 例如,类可以分配数据结构来保存批处理中的命令集。For example, a class may allocate a data structure to hold the set of commands in the batch.

适用于

另请参阅