mi_integer mi_lo_writewithseek(conn, LO_fd, buf, nbytes, offset, whence) MI_CONNECTION *conn; MI_LO_FD LO_fd; const char *buf; mi_integer nbytes; mi_int8 *offset; mi_integer whence;
A pointer to a connection descriptor established by a previous call to mi_open( ), mi_server_connect( ), or mi_server_reconnect( )
A NULL-valued pointer (database server only)
Valid in Client LIBMI Application? | Valid in User-Defined Routine? |
---|---|
Yes | Yes |
The mi_lo_writewithseek( ) function writes nbytes of data to the smart large object that the LO_fd file descriptor identifies. The function obtains the data to write from the user-allocated buffer that buf references. The buffer must be less than two gigabytes in size.
The write begins at the LO seek position of LO_fd that the offset and whence arguments indicate, as follows:
Valid values include the following whence constants.
This offset value can be negative for all values of whence. For more information on how to access eight-bit (INT8) integers, see the IBM Informix: DataBlade API Programmer's Guide.
If the database server writes less than nbytes of data to the smart large object, mi_lo_writewithseek( ) returns the number of bytes that it wrote and raises an exception. This condition can occur when the sbspace runs out of space.
The mi_lo_writewithseek( ) function does not need a connection descriptor to execute. If your UDR does not need a valid connection for other operations, you can specify a NULL-valued pointer for the conn parameter to establish a NULL connection. For information on the advantages of a NULL connection, see the IBM Informix: DataBlade API Programmer's Guide.
See also the descriptions of mi_lo_readwithseek( ), mi_lo_seek( ), and mi_lo_write( ).