Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCI Cartridge Functions, 30 of 43


OCIFileOpen()

Purpose

Opens a file.

Syntax

sword OCIFileOpen( dvoid *hndl, 
                   OCIError       *err, 
                   OCIFileObject  **filep, 
                   OraText        *filename, 
                   OraText        *path, 
                   ub4            mode, 
                   ub4            create, 
                   ub4            type );

Parameters

hndl (IN)

The OCI environment or user session handle.

err (IN/OUT)

The OCI error handle; if there is an error, it is recorded in err and this function returns OCI_ERROR; diagnostic information can be obtained by calling OCIErrorGet().

filep (IN/OUT)

The file identifier.

filename (IN)

The file name as a null-terminated string.

path (IN)

The path of the file as a null-terminated string.

mode (IN)

The mode in which to open the file. Valid modes are

OCI_FILE_READ_ONLY,

OCI_FILE_WRITE_ONLY,

OCI_FILE_READ_WRITE.

create (IN)

Indicates if the file be created if it does not exist -- valid values are:

OCI_FILE_TRUNCATE -- create a file regardless of whether or not it exists. If the file already exists overwrite the existing file.

OCI_FILE_EXCL -- fail if the file exists, else create.

OCI_FILE_CREATE -- open the file if it exists, and create it if it does not.

OCI_FILE_APPEND -- set the file pointer to the end of the file prior to writing. This flag can be ORed with OCI_FILE_CREATE

type (IN)

File type. Valid values are

OCI_FILE_TEXT,

OCI_FILE_BIN,

OCI_FILE_STDIN,

OCI_FILE_STDOUT,

OCI_FILE_STDERR.

Returns

OCI_SUCCESS,

OCI_INVALID_HANDLE,

OCI_ERROR.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback