GetChars method

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

Syntax
Visual Basic

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

public override long GetChars(
   int columnID,
   long srcOffset,
   char[] 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 characters to be copied.

Return value

The actual number of characters copied.

Remarks

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

The characters 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 characters 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