Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid_path exception while using UTL_FILE.FOPEN

776509Apr 25 2011 — edited Apr 29 2011
Hi
I am getting invalid_path exception while using the UTL_FILE.fopen subprogram. I tried finding out the reason but could not solve it. Please help.

Below is my piece of code.

create directory utldr as 'e:\utldir';

declare
f utl_file.file_type;
s varchar2(200);
begin
dbms_output.put_line('1');
f := utl_file.fopen('UTLDR','utlfil.txt','r');
dbms_output.put_line('2');
utl_file.get_line(f,s);
dbms_output.put_line('3');
utl_file.fclose(f);
dbms_output.put_line('4');
dbms_output.put_line(s);
exception
when utl_file.invalid_path then
dbms_output.put_line('invalid_path');
end;

the result is:

1
invalid_path
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2011
Added on Apr 25 2011
31 comments
9,029 views