Use of DBMS_LOB.LOADBLOBFROMFILE-
340134Jun 16 2006 — edited Jun 19 2006I'm trying to read a BFILE into an internal BLOB and I get a message "ORA-22275: invalid LOB locator specified". I'm unable to figure out what would be correct.
Could someone point me in the right direction? TIA, George.
Here's my code fragment:
DECLARE
v_Bfile BFILE;
v_Image BLOB := empty_blob();
v_Title VARCHAR2(100) := ' Bead ';
v_Offset NUMBER := 1;
BEGIN
SELECT bfile_locn, img_title
INTO v_Bfile, v_Title
FROM digital_img
WHERE ref_item_id = 1101460;
DBMS_LOB.OPEN (v_Bfile, DBMS_LOB.FILE_READONLY);
DBMS_LOB.LOADBLOBFROMFILE (v_Image, v_Bfile, DBMS_LOB.LOBMAXSIZE,
v_Offset, v_Offset);
DBMS_LOB.CLOSE (v_Bfile);
END;