GetBytes(Int32, Int64, Byte[], Int32, Int32) method

Copies a subset of the value for the specified ULDbType.LongBinary column, beginning at the specified offset, to the specified offset of the destination System.Byte array.

Syntax
Visual Basic

Public Overrides Function GetBytes( _
   ByVal columnID As Integer, _
   ByVal srcOffset As Long, _
   ByVal dst As Byte(), _
   ByVal dstOffset As Integer, _
   ByVal count As Integer _
) As Long
C#

public override long GetBytes(
   int columnID,
   long srcOffset,
   byte[] dst,
   int dstOffset,
   int count
);
Parameters
  • columnID   The ID number of the column. The value must be in the range [0,ULDataReader.FieldCount-1]. The first column in the cursor has an ID value of zero.

  • srcOffset   The start position in the column value. Zero is the beginning of the value.

  • dst   The destination array.

  • dstOffset   The start position in the destination array.

  • count   The number of bytes to be copied.

Return value

The actual number of bytes copied.

Remarks

If you pass a dst buffer that is a null reference (Nothing in Visual Basic), GetBytes returns the length of the field in bytes.

The bytes at position srcOffset through srcOffset+count-1 of the value are copied into positions dstOffset through dstOffset+count-1, respectively, of the destination array. If the end of the value is encountered before count bytes are copied, the remainder of the destination array is left unchanged.

If any of the following is true, a ULException with code ULSQLCode.SQLE_INVALID_PARAMETER is thrown and the destination is not modified:

For other errors, a ULException with the appropriate error code is thrown.

See also