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, 34 of 43


OCIFileSeek()

Purpose

Changes the current position in a file.

Syntax

sword OCIFileSeek( dvoid         *hndl, 
                   OCIError      *err, 
                   OCIFileObject *filep, 
                   uword         origin, 
                   ubig_ora      offset, 
                   sb1           dir );

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)

A file identifier that uniquely references the file.

origin(IN)

The starting point we want to seek from. The starting point may be

OCI_FILE_SEEK_BEGINNING (beginning),

OCI_FILE_SEEK_CURRENT (current position),

OCI_FILE_SEEK_END (end of file).

offset (IN)

The number of bytes from the origin you want to start reading from.

dir (IN)

The direction to go from the origin.


Note:

The direction can be either OCIFILE_FORWARD or OCIFILE_BACKWARD.


Comments

This will allow a seek past the end of the file. Reading from such a position will cause an end-of-file condition to be reported. Writing to such a position will not work on all file systems. This is because some systems do not allow files to grow dynamically. They require that files be preallocated with a fixed size. Note that this function performs a seek to a byte location.

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