Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
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

DBMS_LOB , 13 of 26


FILEOPEN Procedure

This procedure opens a BFILE for read-only access. BFILEs may not be written through Oracle.

Syntax

DBMS_LOB.FILEOPEN (
   file_loc   IN OUT NOCOPY  BFILE, 
   open_mode  IN             BINARY_INTEGER := file_readonly); 

Parameters

Table 22-24 FILEOPEN Procedure Parameters
Parameter  Description 
file_loc
 

Locator for the BFILE

open_mode
 

File access is read-only. 

Exceptions

Table 22-25 FILEOPEN Procedure Exceptions
Exception  Description 
VALUE_ERROR
 

file_loc or open_mode is NULL

INVALID_ARGVAL
 

open_mode is not equal to FILE_READONLY

OPEN_TOOMANY
 

Number of open files in the session exceeds session_max_open_files

NOEXIST_DIRECTORY
 

Directory associated with file_loc does not exist. 

INVALID_DIRECTORY
 

Directory has been invalidated after the file was opened. 

INVALID_OPERATION
 

File does not exist, or you do not have access privileges on the file. 

Example

CREATE OR REPLACE PROCEDURE Example_10 IS
    fil BFILE;
BEGIN
    -- open BFILE
    SELECT f_lob INTO fil FROM lob_table WHERE key_value = 99;
    IF (dbms_lob.fileexists(fil))
    THEN
        dbms_lob.fileopen(fil, dbms_lob.file_readonly);
        -- file operation
        dbms_lob.fileclose(fil);
    END IF;
    EXCEPTION
        WHEN some_exception
        THEN handle_exception;
END;

See Also:

 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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