Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - .NET Programming » UltraLite .NET 1.0 API Reference » ULDataReader class

GetChar method Next Page

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.


Visual Basic

NotOverridable Public Function GetChars( _
ByVal columnID As Integer, _
ByVal srcOffset As Long, _
ByVal dst As Char(), _
ByVal dstOffset As Integer, _
ByVal count As Integer _
) As Long _
Implements IDataRecord.GetChars


public long GetChars(
int columnID,
long srcOffset,
char[] dst,
int dstOffset,
int count

Return value

The actual number of characters copied.


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.


[external link] IDataRecord.GetChars

See also