|Oracle8i Application Developer's Guide - Large Objects (LOBs)
Release 2 (8.1.6)
Part Number A76940-01
External LOBs (BFILEs), 34 of 41
"Use Case Model: External LOBs (BFILEs)" for all basic operations of External LOBs (BFILES).
BFILENAME() function can be called as part of SQL
UPDATE to initialize a
BFILE column or attribute for a particular row by associating it with a physical file in the server's filesystem.
DIRECTORY object represented by the
directory_alias parameter to this function need not already be defined using SQL DDL before the
BFILENAME() function is called in SQL DML or a PL/SQL program. However, the directory object and operating system file must exist by the time you actually use the BFILE locator (for example, as having been used as a parameter to an operation such as
BFILENAME() does not validate privileges on this
DIRECTORY object, or check if the physical directory that the
DIRECTORY object represents actually exists. These checks are performed only during file access using the
BFILE locator that was initialized by the
You can use
BFILENAME() as part of a SQL
UPDATE statement to initialize a
BFILE column. You can also use it to initialize a
BFILE locator variable in a PL/SQL program, and use that locator for file operations. However, if the corresponding directory alias and/or filename does not exist, then PL/SQL
DBMS_LOB routines that use this variable will generate errors.
directory_alias parameter in the
BFILENAME() function must be specified taking case-sensitivity of the directory name into consideration.
Use the following syntax references:
This example updates Multimedia_tab by means of the
The example is provided in SQL syntax and applies to all programmatic environments: