informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_lo_from_file_by_lofd()

The mi_lo_from_file_by_lofd() function copies a smart large object from a file on the server or client computer into an open smart-large-object file descriptor.

Syntax

Usage

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() because with mi_lo_from_file_by_lofd(), you can:

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 flags 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.

File-Mode Constant Purpose
MI_O_EXCL Open the file only if fname_spec does not exist.
MI_O_TRUNC Zero out the input file before reading it.
MI_O_APPEND Allow appending to the end of the file. (This function does not write to the source file.)
MI_O_RDWR Open the file in read/write mode. (This function does not write to the source file.)
MI_O_RDONLY Open the file in read-only mode.
MI_O_TEXT Process the file as text (not binary). (Binary is used if you do not specify MI_O_TEXT.)
MI_O_SERVER_FILE The fname_spec file is on the server computer.
MI_O_CLIENT_FILE The fname_spec file is on the client computer.

The default flags value is:

Return Values

MI_OK indicates that the function was successful.
MI_ERROR indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_lo_create(), mi_lo_spec_init(), mi_lo_from_file(), and mi_lo_to_file().

For more information, see Using Operating-System Files.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved