Hi all,
I am having problem in the following code:
declare
v_file_id utl_file.file_type;
v_file_dir VARCHAR2(100);
v_file_name VARCHAR2(100);
v_ctl_code VARCHAR2(100);
begin
v_ctl_code := 'This is just a test ...';
v_file_id := utl_file.fopen(v_file_name, 'w', 32767);
utl_file.put_line(v_file_id, v_ctl_code);
exception
WHEN UTL_FILE.INVALID_PATH THEN
RAISE_APPLICATION_ERROR(-20100,'Invalid Path');
WHEN UTL_FILE.INVALID_MODE THEN
RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');
WHEN UTL_FILE.INVALID_OPERATION then
RAISE_APPLICATION_ERROR(-20102,'Invalid Operation');
WHEN UTL_FILE.INVALID_FILEHANDLE then
RAISE_APPLICATION_ERROR(-20103,'Invalid Filehandle');
WHEN UTL_FILE.WRITE_ERROR then
NULL;
WHEN UTL_FILE.READ_ERROR then
RAISE_APPLICATION_ERROR(-20105,'Read Error');
WHEN UTL_FILE.INTERNAL_ERROR then
RAISE_APPLICATION_ERROR(-20106,'Internal Error');
WHEN OTHERS THEN
utl_file.fclose(v_file_id);
raise_application_error (-20001, sqlerrm);
end;
/
parameter is already set to :
utl_file_dir '/test/out'
But the code gives me the following error:
ORA-20100: Invalid Path
ORA-06512: at line 14
Any idea will be highly appreciated.
Thanks and Regards
Aqil