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

Home -> Community -> Usenet -> c.d.o.server -> Re: UTL_FILE exception: INVALID OPERATION

Re: UTL_FILE exception: INVALID OPERATION

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 20 Sep 2004 08:22:39 -0700
Message-ID: <1095693830.984046@yasure>


Sharon wrote:

> I am trying to executing a procedure having some codes like this
>
> data_file_handle := utl_file.fopen('C:\temp','123.dat', 'W');
>
> utl_file.fclose(data_file_handle);
>
> exception
>
> when utl_file.invalid_path then
> p_status := 'UTL_FILE exception: INVALID PATH';
> when utl_file.invalid_mode then
> p_status := 'UTL_FILE exception: INVALID MODE';
> when utl_file.invalid_filehandle then
> p_status := 'UTL_FILE exception: INVALID FILEHANDLE';
> when utl_file.read_error then
> p_status := 'UTL_FILE exception: READ ERROR';
> when utl_file.write_error then
> p_status := 'UTL_FILE exception: WRITE ERROR';
> when utl_file.internal_error then
> p_status := 'UTL_FILE exception: INTERNAL ERROR';
> when utl_file.invalid_operation then
> p_status := 'UTL_FILE exception: INVALID OPERATION';
>
> I first set utl_file_dir = C:\temp in my init.ora file
>
> When I ran it, I got 'UTL_FILE exception: INVALID OPERATION'
>
> Doesn't anyone has any clue what could be the reason to cause this?
>
> Thanks in advance!

Presumably your Oracle installation has a version number.

But just guessing you don't have a utl_file_dir entry in your init.ora.

Comment out the exception handlers and see what error is actually being thrown.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Sep 20 2004 - 10:22:39 CDT

Original text of this message

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