The x is a out parameter of myprocedure. It is a cursor called gencursor. I am trying to print the values but it is not working. Does anyone know what I am doing wrong?
I am getting the following error message:
declare
*
ERROR at line 1:
ORA-06550: line 9, column 11:
PLS-00221: 'X' is not a procedure or is undefined
ORA-06550: line 9, column 1:
PL/SQL: Statement ignored
12-04-2001, 09:04 AM
lesstjm
correction
I gave you the program wrong. It was like this:
declare
x mypackage.gencursor;
begin
mypackage.myprocedure(x);
for v1 in x loop
dbms_output.put_line(v1.name);
end loop;
end;
/
12-04-2001, 10:08 AM
ales
In the Cursor FOR loops you cannot use already opened cursor. A solution might be:
Code:
declare
x mypackage.gencursor;
name varchar2(100);
begin
mypackage.myprocedure(x);
loop
fetch x INTO name;
exit when x%notfound;
dbms_output.put_line(name);
end loop;
close x;
end;