UltraLite ActiveX User's Guide
UltraLite ActiveX API Reference
ULResultSet class
GetByteChunk(
index As Long, _
offset As Long, _
data, _
[ data_len As Long ] _
) As Long
Member of UltraliteActiveX.ULResultSet
Fills the buffer passed in (which should be an array) with the binary data in the column. Suitable for BLOBS.
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 will be raised. A buffer bigger than 64K is also permissible.
data A pointer to an array of bytes.
data_len The length of the buffer, or array. The data_len must be greater than or equal to 0.
The number of bytes read.
Error | Description |
---|---|
ulSQLE_CONVERSION_ERROR | The error occurs if the column data type is not BINARY or LONG BINARY |
ulSQLE_INVALID_PARAMETER |
The 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.
' eMbedded Visual Basic Dim data (512) As Byte ... table.Columns.Item("edata").GetByteChunk(0,data)
// JScript var data = new Array(); // ... table.Columns.Item("edata").GetByteChunk(0,data);