chinmaya224
asked on
PL/SQL - Help needed on UTL_FILE Package
Hi,
Please help me :
I have created a folder in Linux as
/home/oracle/chinu
Then i have created a directory as testfile1 by giving the path /home/oracle/chinu.
Now i have written the below dummy package and when i am executing it s giving me a
error as Directory Not Found.
create or replace
PACKAGE body file_function
IS
PROCEDURE file_import
IS
file_handle utl_file.file_type;
v_file_name VARCHAR2(10) := 'test.txt';
BEGIN
file_handle := SYS.utl_file.fopen('testfi le1',v_fil e_name,'R' );
IF SYS.utl_file.is_open(file_ handle) THEN
SYS.utl_file.fclose(file_h andle);
dbms_output.put_line('Clos e Successfully');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqler rm);
END file_import;
END file_function;
Please help me :
I have created a folder in Linux as
/home/oracle/chinu
Then i have created a directory as testfile1 by giving the path /home/oracle/chinu.
Now i have written the below dummy package and when i am executing it s giving me a
error as Directory Not Found.
create or replace
PACKAGE body file_function
IS
PROCEDURE file_import
IS
file_handle utl_file.file_type;
v_file_name VARCHAR2(10) := 'test.txt';
BEGIN
file_handle := SYS.utl_file.fopen('testfi
IF SYS.utl_file.is_open(file_
SYS.utl_file.fclose(file_h
dbms_output.put_line('Clos
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqler
END file_import;
END file_function;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Boss ... this was a very silly Mistake ...
no pts please