Friends,

I did the following for inserting the image using from sqlplus .. can any one help me to find what exactly is the problem.

CREATE OR REPLACE DIRECTORY IMAGES AS 'C:\';

CREATE TABLE tab1 (col1 BLOB);

i try to import the file into a BLOB datatype and insert it into the table:

DECLARE
v_bfile BFILE;
v_blob BLOB;
BEGIN
INSERT INTO tab1 (col1)
VALUES (empty_blob())
RETURN col1 INTO v_blob;

v_bfile := BFILENAME('IMAGES', 'my.ico');
Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
Dbms_Lob.Fileclose(v_bfile);

COMMIT;
END;
/

i got the error

ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 475
ORA-06512: at line 10

I have verified with the manuals and got the info that the oracle user should have the access to OS directory.. but how to set the permission (find the oracle user??) or any other things to do?? pls help.

Thanks ..Anand.