Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UTL_FILE/Personal Oracle 8.0.3.0.0/Win98 - PLEASE HELP!
Assuming that you did the necessary in the init???.ora, ensure that the
variable in the script pointing to the c: does not have a trailing '/'
e.g path_char(3) := 'c:';
Mark.
Artur wrote in message ...
>Hi,
>
>I have problem opening file using UTL_FILE.FOPEN. It raises
>UTL_FILE.INVALID_PATH exception. File 'C:\NETLOG.TXT' exists. I can open it
>using notepad.
>
>Why I have the problem?
>
>Here is the procedure:
>
>declare
>file_handle UTL_FILE.FILE_TYPE;
>path_ char(3) := 'C:\';
>file_ char(10) := 'NETLOG.TXT';
>begin
> file_handle := UTL_FILE.FOPEN(path_, file_, 'r');
> UTL_FILE.FCLOSE(file_handle);
> exception
> when UTL_FILE.INVALID_MODE then dbms_output.put_line('Error:
>Invalid mode');
> when UTL_FILE.INVALID_FILEHANDLE then
>dbms_output.put_line('Error: Invalid filehandle');
> when UTL_FILE.INVALID_OPERATION then
dbms_output.put_line('Error:
>Invalid operation');
> when UTL_FILE.READ_ERROR then dbms_output.put_line('Error: Read
>error');
> when UTL_FILE.WRITE_ERROR then dbms_output.put_line('Error:
Write
>error');
> when UTL_FILE.INTERNAL_ERROR then dbms_output.put_line('Error:
>Internal error');
> when UTL_FILE.INVALID_PATH then dbms_output.put_line('Error:
>Invalid path');
>end;
>/
>
>
>
Received on Tue Apr 06 1999 - 03:08:37 CDT