Re: UTL_FILE problem

From: Mark G <someone_at_hot>
Date: Mon, 6 Sep 1999 15:18:31 +0100
Message-ID: <37d3ca96.0_at_145.227.194.253>


[Quoted] I'm always dubious about reading/writing a file using utl_file on the root of a drive.

[Quoted] Normally, you would declare the directory without the trailing slash

DECLARE

   v_filename          VARCHAR2(12)    := 'TEST.MAIL';
   v_file_loc          VARCHAR2(40)    := 'C:';

However, because you are dealin with the root directory, i'm not sure if you [Quoted] need it or not. Try it without.

M

Bob wrote in message <7qu8hn$5vo$1_at_nnrp1.deja.com>...
>Hi all:
>
>I'm trying to use UTL_FILE (for the first time ever), to write a file on
>an NT Server. Whenever I try to run it, I get a UTL_FILE.INVALID_PATH
>exception.
>
>I've modified initorcl.ora to include UTL_FILE_DIR = * (for
>testing--initially I had it limited to one specific directory) and I've
>stopped and restarted ORCL. Actually, I've rebooted the server just to
>be sure. I'm running the script on on the server, too.
>
>Here's my code:
>
>DECLARE
> v_filename VARCHAR2(12) := 'TEST.MAIL';
> v_file_loc VARCHAR2(40) := 'C:\';
> v_file_mode VARCHAR2(1) := 'A';
> v_file_handle UTL_FILE.FILE_TYPE;
>
>BEGIN
> v_file_handle := UTL_FILE.FOPEN (v_file_loc,
> v_filename,
> v_file_mode);
>
>(I've also tried directories other than the root.) Does anyone have any
>clues about what I might be doing wrong?
>
>Thank, very much, in advance.
>
>Bob
>--
>Bob M.
>
>Step outside. The graphics are AMAZING!
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Mon Sep 06 1999 - 16:18:31 CEST

Original text of this message