Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problems to create text files
Hi,
You have opened file for reading ('r' parameter):
fileid := utl_file.fopen('C:\Temp', 'test.sql', 'r') ;
But you writing to this file:
utl_file.put_line(fileid,'on est la') ;
Regards
Wojtek
Jean-Christophe MARTIN wrote:
> Hello!
>
> We've got here a little problem in creating text files within an Oracle
> procedure using the fOpen command.
>
> Running the following simple code, the answer is always 'invalid path'.
>
> CREATE OR REPLACE PROCEDURE testp is
> fileid utl_file.file_type ;
> begin
> fileid := utl_file.fopen('C:\Temp', 'test.sql', 'r') ;
> utl_file.put_line(fileid,'on est la') ;
> utl_file.fclose(fileid) ;
>
> exception
> when utl_file.invalid_path then
> DBMS_OUTPUT.put_line('invalid path') ;
> Raise ;
> End;
>
> We have made sure than the parameter 'utl_file_dir=*' is present in the
> 'initorcl.ora' file (with the assistance of the Oracle HotLine)
> The problem is present on the Oracle server (PC) itself, so it cannot be an
> user authorization or net default.
>
> If you have answers, please mail them to dr_jcm_at_hotmail.com.
>
> Thanks a lot
Received on Fri Nov 19 1999 - 10:35:19 CST