SashaBuilder3
Programmer
Hi everybody!
I've just started learning Oracle and PL/SQL and a lot of basic things are unclear to me.
I wrote a simple sample procedure to read a file:
PROCEDURE mp2 IS
/*file reading*/
str1 varchar2(100);
dir varchar2(80);
fnm varchar2(10);
fin UTL_FILE.FILE_TYPE;
BEGIN
dir:='C:\D\OR\LOAD';
fnm:='a.txt';
fin:=UTL_FILE.FOPEN(dir,fnm,'r');
UTL_FILE.GET_LINE(fin,str1);
DBMS_OUTPUT.put_line(str1);
UTL_FILE.FCLOSE(fin);
END;
When I am trying to execute the procedure I am getting the following error messages:
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at "AM.MP2", line 13
ORA-06512: at line 2
That's where I am stuck.
Can anyone help?
Thanks,
Alexandre
I've just started learning Oracle and PL/SQL and a lot of basic things are unclear to me.
I wrote a simple sample procedure to read a file:
PROCEDURE mp2 IS
/*file reading*/
str1 varchar2(100);
dir varchar2(80);
fnm varchar2(10);
fin UTL_FILE.FILE_TYPE;
BEGIN
dir:='C:\D\OR\LOAD';
fnm:='a.txt';
fin:=UTL_FILE.FOPEN(dir,fnm,'r');
UTL_FILE.GET_LINE(fin,str1);
DBMS_OUTPUT.put_line(str1);
UTL_FILE.FCLOSE(fin);
END;
When I am trying to execute the procedure I am getting the following error messages:
ERROR at line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 98
ORA-06512: at "SYS.UTL_FILE", line 157
ORA-06512: at "AM.MP2", line 13
ORA-06512: at line 2
That's where I am stuck.
Can anyone help?
Thanks,
Alexandre