ASA Programming Guide
Adaptive Server Anywhere .NET Data Provider API Reference
AsaDataReader class
Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
long GetBytes(
int ordinal,
long dataIndex,
byte[ ] buffer,
int bufferIndex,
int length
)
ordinal An ordinal number indicating the column from which the value is obtained. The numbering is zero-based.
dataIndex The index within the column value from which to read bytes.
buffer An array in which to store the data.
bufferIndex The index in the array to start copying data.
length The maximum length to copy into the specified buffer.
The number of bytes read.
IDataRecord.GetBytes
GetBytes returns the number of available bytes in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, when the AsaDataReader is reading a large data structure into a buffer.
If you pass a buffer that is a null reference (Nothing in Visual Basic), GetBytes returns the length of the field in bytes.
No conversions are performed, so the data retrieved must already be a byte array.