共用方式為


SqlDataRecord.SetBytes(Int32, Int64, Byte[], Int32, Int32) 方法

定義

將儲存在資料行的資料設定為 Byte 值的指定陣列。

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

參數

ordinal
Int32

資料行以零為起始的序數。

fieldOffset
Int64

要開始複製位元組之欄位值的位移。

buffer
Byte[]

要從其中複製位元組的目標緩衝區。

bufferOffset
Int32

要從其中開始複製位元組之緩衝區的位移。

length
Int32

要從該緩衝區複製的位元組數目。

例外狀況

ordinal 小於 0 或大於資料行數目 (亦即 FieldCount)。

適用於