ifx_lo_writewithseek(lofd, buf, offset, whence)
The function accepts the following 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 Informix ODBC Driver C data type of SQL_C_CHAR for offset, use SQL_C_LONG or SQL_C_SHORT. For more information, see SQL_BIGINT. |
whence | SQL_INTEGER | Input | Starting seek position. The possible values are: |
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(). Neither the size of buf nor cbValueMax can exceed 2 gigabytes. To write to a smart large object that is larger than 2 gigabytes, write to it in 2-gigabyte 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.