Fills the buffer passed in (which should be an array) with the binary data in the column.
GetByteChunk ( _
index As Integer, _
src_offset As Long, _
data As Long, _
data_len As Long, _
filled_len As Long _
) As Boolean
Member of UltraLiteAFLib.ULResultSet
index The 1-based ordinal of the column containing the binary data.
offset The offset into the underlying 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.
data A pointer to an array of bytes. To get the pointer to the array of bytes, use the Visual Basic VarPtr() function.
data_len The length of the buffer, or array. The data_len must be greater than or equal to 0.
filled_len The number of bytes fetched. Because you do not know how big the BLOB data is in advance, you generally fetch it using a fixed-length chunk, one chunk at a time. The last chunk may be smaller than your chunk size. filled_len reports how many bytes were actually fetched.
The number of bytes read.
This method throws an error if the underlying column is NULL. Applications should first check for a NULL value in the property or method.
This method is suitable for BLOBs.
ulSQLE_CONVERSION_ERROR This error occurs if the column data type is not BINARY or LONG BINARY.
ulSQLE_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.
The error also occurs if the column data type is LONG BINARY and the offset is less than 1.
In the following example, edata is a column name. If the data_len parameter passed in is not sufficiently long, the entire application terminates.
Dim data (512) As Byte ... table.Column("edata").GetByteChunk(0,data)