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

GetByte method Next Page

GetBytes 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

Overloads NotOverridable Public Function GetBytes( _
ByVal columnID As Integer, _
ByVal srcOffset As Long, _
ByVal dst As Byte(), _
ByVal dstOffset As Integer, _
ByVal count As Integer _
) As Long _
Implements IDataRecord.GetBytes

C#

public long GetBytes(
int columnID,
long srcOffset,
byte[] dst,
int dstOffset,
int count
);

Parameters
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.

Exceptions
Implements

[external link] IDataRecord.GetBytes

See also