ORA 24338
442032Jan 31 2008 — edited Feb 1 2008I have this package body that compiles with no problem but when run produces ORA 24338
create or replace package body test_pkg as
procedure myCurTest(sqlQuery IN varchar2,myCur OUT mscRC,cnt out number) is
-- type refCur is ref cursor
-- cMyCursor refCur
ccode number(6);
cname varchar2(40);
vTable_Name varchar2(30);
begin
open myCur for 'select carrier_code from test_table';
loop
fetch myCur into ccode;
exit when myCur%notfound;
end loop;
cnt := to_char(myCur%rowcount);
close myCur;
dbms_output.put_line('Cursor row count: '||cnt);
end;
end;
/
show err
Could someone please explain why is this happening?
SQL> exec test_pkg.MYCURTEST('test',:rc,:s);
Cursor row count: 1448
PL/SQL procedure successfully completed.
S
----------
1448
ERROR:
ORA-24338: statement handle not executed
SP2-0625: Error printing variable "rc"
SQL>