Re: UTL_FILE question

From: Andrew Hardy <nobody_at_spam.from.news.AdvanticaTech.com>
Date: Mon, 22 Oct 2001 10:02:22 +0100
Message-ID: <9r0nb3$ev0$1_at_sun-cc204.lut.ac.uk>


"Olaf F. Normann" <olafn_at_runit.no> wrote in message news:1003738464.664390_at_halvan.trd.sintef.no...
> Hello all Oracle experts!
> I try to use the UTL_FILE packages, but when I execute
> the following script, I get trapped in the exeption regardless of which
> path I enter (I got the script from http://www.orafaq.com/faqplsql.htm).
>
> Do I need to enter anything in the "INIT.ORA" file? If so, how is
> the format?

Yes you do. Read the second sentence in the article that you refer to.

Andy
>
> Please help!!
>
> Best regards
> Olaf F. Normann
>
> --snipp----snipp----snipp----snipp----snipp----snipp--
>
> DECLARE
> fileHandler UTL_FILE.FILE_TYPE;
> BEGIN
> fileHandler := UTL_FILE.FOPEN('f:\oracle', 'myfile', 'w');
> UTL_FILE.PUTF(fileHandler, 'Look ma, I''m writing to a file!!!\n');
> UTL_FILE.FCLOSE(fileHandler);
> EXCEPTION
> WHEN utl_file.invalid_path THEN
> raise_application_error(-20000, 'FEIL: Invalid path for file or path not
in
> INIT.ORA.');
> END;
>
>
Received on Mon Oct 22 2001 - 11:02:22 CEST

Original text of this message