Home | Previous Page | Next Page   Data Manipulation > Using Smart Large Objects > Converting a Smart Large Object to a File or Buffer >

Using Operating-System Files

The DataBlade API supports the following types of functions for conversion between operating-system files and smart large objects.

DataBlade API
Function
Description
mi_lo_from_file( ),
mi_lo_from_file_by_lofd( )
Copies data in an operating-system file to a smart large object
mi_lo_to_file( ),
mi_lo_filename( )
Copies data in a smart large object to an operating-system file

The file functions have a set of file-mode constants that are distinct from the open modes of smart large objects, as the table in Table 43 shows.

Table 43. File Modes for Operating-System Files
File Mode for Operating-System Files Purpose
MI_O_EXCL Fail if the file already exists
MI_O_APPEND Append to the end of file
MI_O_TRUNC Truncate to zero if file exists
MI_O_RDWR Read/write mode (default)
MI_O_RDONLY Read-only mode (copying from operating-system files only)
MI_O_WRONLY Write-only mode (copying to operating-system files only)
MI_O_TEXT Text mode (default off)
MI_O_CLIENT_FILE Indication that file is on client computer (default)
MI_O_SERVER_FILE Indication that file is on server computer

You can include an environment variable in the filename path for the mi_lo_to_file( ), mi_lo_from_file( ), and mi_lo_from_file_by_lofd( ) functions. This environment variable must be set in the server environment; that is, it must be set before the database server starts.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]