DbDataAdapter.GetBatchedParameter(Int32, Int32) 方法

定义

从当前批处理中的其中一个命令返回一个 IDataParameterReturns a IDataParameter from one of the commands in the current batch.

protected:
 virtual System::Data::IDataParameter ^ GetBatchedParameter(int commandIdentifier, int parameterIndex);
protected virtual System.Data.IDataParameter GetBatchedParameter (int commandIdentifier, int parameterIndex);
abstract member GetBatchedParameter : int * int -> System.Data.IDataParameter
override this.GetBatchedParameter : int * int -> System.Data.IDataParameter
Protected Overridable Function GetBatchedParameter (commandIdentifier As Integer, parameterIndex As Integer) As IDataParameter

参数

commandIdentifier
Int32

要从中检索参数的命令的索引。The index of the command to retrieve the parameter from.

parameterIndex
Int32

命令内的参数的索引。The index of the parameter within the command.

返回

指定的 IDataParameterThe IDataParameter specified.

异常

该适配器不支持批处理。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 to allow users to execute a batch. 实现使用提供的 commandIdentifier 来定位请求的命令,然后使用提供的 parameterIndex 来定位请求的参数。An implementation uses the commandIdentifier provided to locate the requested command, then uses the parameterIndex provided to locate the requested parameter. 例如,commandIdentifier 0 和 parameterIndex 0 返回批处理中第一个命令的第一个参数。For example, a commandIdentifier of 0 and a parameterIndex of 0 returns the first parameter from the first command in the batch.

适用于

另请参阅