Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: UTL_FILE/Personal Oracle 8.0.3.0.0/Win98 - PLEASE HELP!

Re: UTL_FILE/Personal Oracle 8.0.3.0.0/Win98 - PLEASE HELP!

From: Mark Gumbs <mgumbs_at_hotmail.com>
Date: Tue, 6 Apr 1999 09:08:37 +0100
Message-ID: <3709bf4b.0@145.227.194.253>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US