Copies a subset of the contents of a specified SQLType.LONGBINARY or SQLType.BINARY column, beginning at a specified source offset, to a specified offset of the destination byte array.
UInt32 getBytesSection( UInt16 index, UInt32 srcOffset, Array dst, UInt32 dstOffset, UInt32 count )
index The 1-based ordinal of the column containing the binary data.
srcOffset The zero-relative offset into the source array of bytes. The source offset must be greater than or equal to 0, otherwise a SQLE_INVALID_PARAMETER error is raised. A buffer bigger than 64K is also permissible.
dst A destination array of bytes.
dstOffset The zero-relative offset into the destination array of bytes. The destination offset must be greater than or equal to 0, otherwise a SQLE_INVALID_PARAMETER error is raised. A buffer bigger than 64K is also permissible.
count The number of bytes to move. The count must be greater than or equal to 0.
The number of bytes read.
The bytes at position
srcOffset (starting from 0) through
srcOffset+count-1 of the source array are copied into positions dstOffset through dstOffset+count-1, respectively, of the destination array.
If the end of the source value is encountered before the specified number of bytes are copied, the remainder of the destination
array is left unchanged.
If any of the following is true, an error is thrown, SQLError code is set to SQLE_INVALID_PARAMETER, and the destination is not modified:
SQLE_CONVERSION_ERROR This error occurs if the column data type is not BINARY or LONG BINARY.
SQLE_INVALID_PARAMETER This error occurs if the column data type is BINARY and the offset is not 0 or 1, or, the data length is less than 0.
This error also occurs if the column data type is LONG BINARY and the offset is less than 1.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|