We help IT Professionals succeed at work.
Get Started

ORA-22285: non-existent directory or file for FILEOPEN operation

93 Views
Last Modified: 2020-03-23
hi am geting the following error
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 805
ORA-06512: at "Iusername.LOAD_IMAGES", line 17
ORA-06512: at line 1

am using this script
create or replace procedure load_images
(
   p_id         in   number,
   p_file_name      in   varchar2
)
is
   v_bfile          bfile := bfilename( 'IMAGES' , p_file_name);
   v_blob          blob;
   v_src_offset  number := 1;
   v_dst_offset  number := 1;
begin

     insert into noc_image_liabrary (id, image_name, image_file)
        values (p_id, p_file_name, empty_blob())
        return images into v_blob;

   dbms_lob.fileopen(v_bfile, dbms_lob.file_readonly);
   dbms_lob.loadblobfromfile(v_blob, v_bfile, dbms_lob.getlength(v_bfile),v_src_offset,v_dst_offset);
   dbms_lob.close(v_bfile);
   commit;
end;
/

Open in new window

Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE