The ifx_lo_readwithseek() function
The ifx_lo_readwithseek() function performs a seek operation and then reads data from an open smart large object.
Syntax
ifx_lo_readwithseek(lofd, buf, offset, whence)
Arguments
Argument | Type | Use | Description |
---|---|---|---|
lofd | SQL_INTEGER | Input | Smart-large-object file descriptor |
buf | SQL_CHAR | Output | Pointer to a character buffer into which the function will read the data |
offset | SQL_BIGINT | Input | Offset from the starting seek position, in bytes. Instead of using the default Informix® ODBC Driver C data type of SQL_C_CHAR for offset, use SQL_C_LONG or SQL_C_SHORT. |
whence | SQL_INTEGER | Input | Starting seek position. The possible values are:
|
Usage
The ifx_lo_readwithseek() function performs a seek operation and then reads data from an open smart large object. The read begins at the seek position of lofd that the offset and whence arguments indicate.
The ifx_lo_readwithseek() function reads cbValueMax bytes of data. cbValueMax is an input argument for SQLBindParameter() and SQLBindCol(). The size of buf or cbValueMax cannot exceed 2 GB. To read a smart large object that is larger than 2 gigabytes, read it in 2-GB chunks. The ifx_lo_readwithseek() function reads this data into the user-defined buffer to which buf points.
If SQLBindParameter() or SQLBindCol() returns SQL_SUCCESS, then pcbValue, which is an argument for each of these functions, contains the number of bytes that the function read from the smart large object. If SQLBindParameter() or SQLBindCol() returns SQL_SUCCESS_WITH_INFO, then pcbValue contains the number of bytes that are available to read from the smart large object.