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 -> URGENT: UTL_FILE Problem

URGENT: UTL_FILE Problem

From: <rock_cogar_at_my-deja.com>
Date: Wed, 01 Dec 1999 16:40:19 GMT
Message-ID: <823j1i$iqk$1@nnrp1.deja.com>


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;
input_rec varchar2(200);

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

Original text of this message

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