PL/SQL Compilation Fails with: PLS-00801: INTERNAL ERROR [74303] Or PLS-00324: cursor attribute may not be applied to non-cursor
(Doc ID 1012357.6)
Last updated on FEBRUARY 03, 2022
Applies to:
PL/SQL - Version 7.3.4.5 and laterInformation in this document applies to any platform.
Symptoms
Compiling a PL/SQL package body fails with:
PLS-00801: internal error [74303]
Or in later versions
PLS-00324: cursor attribute may not be applied to non-cursor
For Example:
SQL> create or replace package mypack as
2 TYPE taskrec IS RECORD (v_task varchar(2), tname varchar(5));
3 TYPE task IS REF CURSOR return taskrec;
4 function get_task (Atask IN OUT task) return integer;
5 end;
6 /
Package created.
SQL> create or replace package body mypack as
2 function get_task (Atask IN OUT task) return integer is
3 val integer default 0;
4 begin
5 if task%ISOPEN THEN
6 null;
7 else
8 open Atask for
9 select ename, empno from emp where ename='FORD'
10 order by empno;
11 END IF;
12 val := 0;
13 return (val);
14 EXCEPTION WHEN OTHERS THEN
15 val := SQLCODE;
16 return(val);
17 end get_task;
18 end mypack;
19 /
Warning: Package Body created with compilation errors.
SQL> show errors
Errors for PACKAGE BODY MYPACK:
LINE/COL ERROR
-------- -----------------------------------------------
0/0 PLS-00801: internal error [74303]
Or
SQL> show errors
Errors for PACKAGE BODY MYPACK:
LINE/COL ERROR
-------- -----------------------------------------------------------------
5/9 PL/SQL: Statement ignored
5/12 PLS-00324: cursor attribute may not be applied to non-cursor 'TASK'
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |