SqlDataRecord.SetChars(Int32, Int64, Char[], Int32, Int32) SqlDataRecord.SetChars(Int32, Int64, Char[], Int32, Int32) SqlDataRecord.SetChars(Int32, Int64, Char[], Int32, Int32) SqlDataRecord.SetChars(Int32, Int64, Char[], Int32, Int32) Method

定义

将存储在列中的数据设置为指定的 Char 值数组。Sets the data stored in the column to the specified array of Char values.

public:
 virtual void SetChars(int ordinal, long fieldOffset, cli::array <char> ^ buffer, int bufferOffset, int length);
public virtual void SetChars (int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length);
abstract member SetChars : int * int64 * char[] * int * int -> unit
override this.SetChars : int * int64 * char[] * int * int -> unit
Public Overridable Sub SetChars (ordinal As Integer, fieldOffset As Long, buffer As Char(), bufferOffset As Integer, length As Integer)

参数

ordinal
Int32 Int32 Int32 Int32

从零开始的列序号。The zero-based ordinal of the column.

fieldOffset
Int64 Int64 Int64 Int64

字段值中的偏移量,从该位置开始复制字符。The offset into the field value to start copying characters.

buffer
Char[]

要从其中复制字符的目标缓冲区。The target buffer from which to copy chars.

bufferOffset
Int32 Int32 Int32 Int32

缓冲区中的偏移量,从该位置开始复制字符。The offset into the buffer from which to start copying chars.

length
Int32 Int32 Int32 Int32

要从缓冲区复制的字符数。The number of chars to copy from the buffer.

异常

ordinal 小于 0 或大于列数(即 FieldCount)。The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

适用于