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: Help with UTL_FILE under 7.3.2?

Re: Help with UTL_FILE under 7.3.2?

From: Patrick Flahan <flahan_at_southeast.net>
Date: 1997/10/07
Message-ID: <61ccbu$lgk@news.southeast.net>#1/1

 Hey,
I recently tried using the utl_file package and ran into a similar problem. The directory you read or write to must be specified in the (i think it is called this) orainit file on the database server.

Patrick Flahan

Dr. John B. Matthews wrote in article <1997Oct4.132608_at_nova.wright.edu>...

>Hi!
>
>I'm trying to use the package UTL_FILE to write to an OS file
>under Oracle 7.3.2 on Solaris. Sadly the code below dies with an
>invalid_path exception. Can anyone offer a clue?
>
>News or email is fine; thanks in advance.
>
>John
>----------------------------------------------------------------
>John B. Matthews, M.D.
>jmatthews_at_nova.wright.edu, john_matthews_at_ccmail.dayton.saic.com
>"Whom the gods would destroy, they first invite to program in C"
>
>-----
>
> PROCEDURE ftest IS
>
> f utl_file.file_type;
>
> BEGIN
>
> f := utl_file.fopen(
> '/oracle/app/oracle/product/7.3.2','ftest.txt', 'w');
> utl_file.put_line(f, 'Hello world!');
> utl_file.fclose(f);
>
> EXCEPTION
> WHEN utl_file.invalid_path THEN
> DBMS_Output.Put_Line('Invalid path.');
> WHEN utl_file.invalid_mode THEN
> DBMS_Output.Put_Line('Invalid mode.');
> WHEN utl_file.invalid_operation THEN
> DBMS_Output.Put_Line('Invalid operation.');
> WHEN OTHERS THEN
> DBMS_Output.Put_Line(SQLCODE||': '||SQLERRM);
>
> END;
>
>
Received on Tue Oct 07 1997 - 00:00:00 CDT

Original text of this message

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