mi_integer mi_lo_from_file_by_lofd(conn, LO_fd, fname_spec, open_mode, offset, amount) MI_CONNECTION *conn; MI_LO_FD LO_fd; const char *fname_spec; mi_integer open_mode; mi_integer offset; mi_integer amount;
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? |
---|---|
No | Yes |
The mi_lo_from_file_by_lofd( ) function enables you to write to a smart large object that is already open. This function provides more flexibility than mi_lo_from_file( ), in the following ways:
To include environment variables in the fname_spec path, use the following syntax:
$ENV_VAR
You must set these environment variables in the database server environment, before the database server starts.
The mi_lo_from_file_by_lofd( ) function can create the target files on either the server or the client computer. The file-mode flag values for the open_mode argument indicate the location of the file to copy and the access mode of the source file. Valid values include the following file-mode constants.
The default open_mode value is:
MI_O_RDONLY | MI_O_CLIENT_FILE
The mi_lo_from_file_by_lofd( ) 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_create( ), mi_lo_spec_init( ), mi_lo_from_buffer( ), mi_lo_from_file( ), and mi_lo_to_file( ).