| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> UTL_File -- invalid path error
Would anyone happen to know why the code below the dashed line
gives as error the following 3 lines?
> Right before opening the file
> Invalid Path Error 1 User-Defined Exception
> PL/SQL procedure successfully completed.
Both my
C:\oracle\admin\Oracle9i\pfile\init.ora as well as my
C:\oracle\admin\Ora9i\pfile\init.ora
files, have the line:
utl_file_dir=c:\\
somewhere towards the bottom...
thx
maa
BEGIN
dbms_output.put_Line('Before Opening the file');
InFile := UTL_FILE.FOPEN('C:\', 'FILEIO.TXT', 'R');
DBMS_Output.Put_Line('After the FileOpen');
LOOP
BEGIN
UTL_FILE.GET_LINE(InFile, InputLine);
DBMS_Output.Put_Line(InputLine);
EXCEPTION
WHEN NO_DATA_FOUND THEN EXIT;
END;
END LOOP;
UTL_FILE.FCLOSE(InFile);
DBMS_Output.Put_Line('Execution Ends.');
EXCEPTION
WHEN UTL_File.Invalid_Path THEN
DBMS_Output.Put_Line('Invalid Path Error '
|| TO_CHAR(SQLCODE)
|| ' ' || SQLErrM);
WHEN UTL_File.Invalid_Mode THEN
DBMS_Output.Put_Line('Invalid Mode Error '
|| TO_CHAR(SQLCODE)
|| ' ' || SQLErrM);
/**/
WHEN UTL_File.Invalid_Operation THEN
DBMS_Output.Put_Line('Invalid Operation Error '
|| TO_CHAR(SQLCODE)
|| ' ' || SQLErrM);
WHEN UTL_File.Internal_Error THEN
DBMS_Output.Put_Line('Internal Error '
|| TO_CHAR(SQLCODE)
|| ' ' || SQLErrM);
WHEN OTHERS THEN
DBMS_Output.Put_Line('Error ' || To_Char(SQLCODE)
|| ' ' || SQLErrM);
END;
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Sat Feb 14 2004 - 15:25:35 CST
![]() |
![]() |