| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: UTL_FILE problems.
Ed wrote:
> Can someone explain why I am getting ORA-06510 errors from this code
> snippet? I have the appropriate privileges to read from this directory
> (I think).
>
> Thanks In Advance,
> Ed
>
> SQL> list
> 1 create or replace procedure tp2UpdateCodes
> 2 is
> 3 v_line varchar2(128);
> 4 c_location constant varchar2(80) := '/tmp/';
> 5 c_filename constant varchar2(80) := 'tpcodes.txt';
> 6 v_handle Utl_File.File_Type := NULL;
> 7 begin
> 8 v_handle := UTL_FILE.FOPEN ( c_location,
> 9 c_filename,
> 10 'r',
> 11 32767 );
> 12 loop
> 13 Utl_File.Get_Line ( file => v_handle,
> 14 buffer => v_line );
> 15 Dbms_Output.Put_Line ( v_line || '--' );
> 16 end loop;
> 17 Utl_File.Fclose ( file => v_handle );
> 18 exception
> 19 when no_data_found then null;
> 20* end tp2UpdateCodes;
> SQL> execute tp2UpdateCodes
> BEGIN tp2UpdateCodes; END;
>
> *
> ERROR at line 1:
> ORA-06510: PL/SQL: unhandled user-defined exception
> ORA-06512: at "SYS.UTL_FILE", line 120
> ORA-06512: at "SYS.UTL_FILE", line 293
> ORA-06512: at "ICCONTST2.TP2UPDATECODES", line 8
> ORA-06512: at line 1
This may or may NOT be of any help.
I always use 'R', 'W' or 'A' and they work for me.
I don't know for sure if the flag is case sensitive or not.
This should be easy for you to test & report back the results.
HTH & YMMV HAND! Received on Tue May 13 2003 - 19:09:26 CDT
![]() |
![]() |