The ifx_lo_writewithseek() function
The ifx_lo_writewithseek() function performs a seek operation and then writes data to an open smart large object.
Syntax
ifx_lo_writewithseek(lofd, buf, offset, whence)
Arguments
Argument | Type | Use | Description |
---|---|---|---|
lofd | SQL_INTEGER | Input | Smart-large-object file descriptor. |
buf | SQL_CHAR | Input | Buffer that contains the data that the function writes to the smart large object. The size of the buffer must not exceed 2 gigabytes. |
offset | SQL_BIGINT | Input | Offset from the starting seek position, in bytes. Instead of using the default HCL OneDB™ 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_writewithseek() function performs a seek operation and then writes data to an open smart large object. The write begins at the seek position of lofd that the offset and whence arguments indicate.
The ifx_lo_writewithseek() function writes cbValueMax bytes of data. cbValueMax is an input argument for SQLBindParameter() and SQLBindCol(). The size of buf or cbValueMax cannot exceed 2 GB. To write to a smart large object that is larger than 2 gigabytes, write to it in 2-GB chunks. The ifx_lo_writewithseek() function gets the data from the user-defined buffer to which buf points.
If SQLExecDirect() or SQLExecute() returns SQL_SUCCESS_WITH_INFO, then the database server wrote less than cbValueMax bytes of data to the smart large object and pcbValue, which is an argument for each of these functions, contains the number of bytes that the function wrote. This condition can occur when the sbspace runs out of space.