Problem with UTL_FILE in NT40 Environment
Date: 1997/08/15
Message-ID: <33F480DD.4EC2_at_vitek.com>#1/1
I can't execute the procedure using UTL_FILE built in package. Here is the body of my code:
PROCEDURE struct_arr_p IS
file_handle UTL_FILE.FILE_TYPE;
CURSOR a_table_curs IS SELECT * FROM a_table;
TYPE a_table_curs_tab_typ IS TABLE OF a_table%ROWTYPE
INDEX BY BINARY_INTEGER;
a_table_curs_tab a_table_curs_tab_typ;
i BINARY_INTEGER := 1;
BEGIN
.
.
file_handle := UTL_FILE.FOPEN ('c:\dev2000\', 'utldmp.txt', 'W');
FOR a_table_rec IN a_table_curs
LOOP
a_table_curs_tab(i) := a_table_rec;
i := i + 1;
END LOOP;
i := i -1;
.
.
WHILE i > 0
LOOP
UTL_FILE.PUT_LINE (file_handle, a_table_curs_tab(i).a_col);
i := i - 1;
END LOOP;
UTL_FILE.FCLOSE (file_handle);
.
.
END;
It compiles but does not execute. The error messages are:
SQL> execute struct_arr_p;
begin struct_arr_p; end;
*
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.UTL_FILE", line 82 ORA-06512: at "SYS.UTL_FILE", line 120 ORA-06512: at "SYSTEM.STRUCT_ARR_P", line 9 ORA-06512: at line 1
I will very much appreciate your assistance!
Adam tadj. Received on Fri Aug 15 1997 - 00:00:00 CEST