Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> URGENT: UTL_FILE Problem
Hi,
I have a problem with UTL_FILE. I am running NT 4.0 sp5, with Oracle 8.1.5. I am working on the server itself, logged on as SYS (!).
The Problem: No matter what I try the function UTL_FILE.FOPEN() fails with "Invalid path".
Here is the script:
-- ------------------------------------------------------------------DECLARE input_file utl_file.file_type;
begin
input_file := utl_file.fopen ( 'g:/temp', 'Cars_y.fff', 'r');
utl_file.get_line (input_file, input_rec);
insert into imports.metadata (id, narrative1) values( 1, input_rec );
utl_file.fclose(input_file);
commit;
exception
when no_data_found
then utl_file.fclose (input_file); when utl_file.internal_error
then utl_file.fclose (input_file); raise_application_error(-20003,'Internal Error'); when utl_file.invalid_filehandle then utl_file.fclose (input_file); raise_application_error(-20003,'Invalid file handle'); when utl_file.invalid_operation then utl_file.fclose (input_file); raise_application_error(-20003,'Invalid operation'); when utl_file.invalid_path then utl_file.fclose (input_file); raise_application_error(-20003,'Invalid path'); when utl_file.read_error then utl_file.fclose (input_file); raise_application_error(-20003,'Read error'); when utl_file.write_error then utl_file.fclose (input_file); raise_application_error(-20003,'Write error'); when value_error then utl_file.fclose (input_file); raise_application_error(-20003,'Value error'); when others then utl_file.fclose (input_file);
raise_application_error(-20002,To_Char(SQLCODE)||SQLERRM);
end;
Thanks,
Rock Cogar.
Radian International LLC.
Oak Ridge, TN. USA.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Dec 01 1999 - 10:40:19 CST
![]() |
![]() |