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 2.0 API Reference » ULDataReader class » GetBytes methods

GetBytes methods Next Page

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.


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


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

Return value

The actual number of bytes copied.


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