Oracle® interMedia Reference 10g Release 1 (10.1) Part Number B10829-01 |
|
|
View PDF |
Format
getBFile( ) RETURN BFILE;
Description
Returns the LOB locator of the BFILE containing the media.
Parameters
None.
Usage Notes
This method constructs and returns a BFILE using the stored source.srcLocation and source.srcName attribute information (of the embedded ORDSource object). The source.srcLocation attribute must contain a defined directory object. The source.srcName attribute must be a valid file name and source.srcType must be "file".
Pragmas
PRAGMA RESTRICT_REFERENCES(getBFile, WNDS, WNPS, RNDS, RNPS)
Exceptions
ORDSourceExceptions.INCOMPLETE_SOURCE_INFORMATION
This exception is raised if the source.srcType attribute value is NULL.
ORDSourceExceptions.INVALID_SOURCE_TYPE
This exception is raised if the value of the source.srcType attribute is other than "file".
Examples
Return the BFILE for the stored source directory and file name attributes:
DECLARE obj ORDSYS.ORDVideo; videobfile BFILE; BEGIN SELECT product_video INTO obj FROM pm.online_media WHERE product_id = 2030; -- Get the video BFILE. videobfile := obj.getBFile(); COMMIT; EXCEPTION WHEN ORDSYS.ORDSourceExceptions.INCOMPLETE_SOURCE_INFORMATION THEN DBMS_OUTPUT.PUT_LINE('The source.srcType attribute value is NULL'); WHEN ORDSYS.ORDSourceExceptions.INVALID_SOURCE_TYPE THEN DBMS_OUTPUT.PUT_LINE('The value of srcType is not file'); END; /