Hi,

I am learning oracle and I am getting this error when compiling my procedure. Can someone help me out.

I think the problem is in the cursor, but I am not sure.

CREATE OR REPLACE PROCEDURE COMPLETER

(i_protocol VARCHAR2,
i_layout_name VARCHAR2,
i_pane_usage_seq VARCHAR2,
i_table VARCHAR2,
i_page_status VARCHAR2,
i_keys VARCHAR2,
o_result OUT VARCHAR2,
o_message OUT VARCHAR2
)

AS
cur_RECEIVED number := null;
cur_VISIT VARCHAR2(80) := null;
cur_PATID VARCHAR2(10) := null;
cur_pageno VARCHAR2(3) := null;
complete NUMBER := null;
tbl_fnd VARCHAR2(80);
io_lookup_id NUMBER := null;
i_where varchar2(2000) := null;
O_VALUE_LIST varchar2(100);
l_received number(2);
ignore number;
c_len number;
c number;
sql_str varchar2(2000);

BEGIN


ct_string.init_name_value_arrays(i_keys);
cur_patid := ct_string.get_array_value('PATID');
cur_pageno := ct_string.get_array_value('PAGENO');
c_len := length(cur_pageno);


c := dbms_sql.open_cursor;

sql_str := 'select complete from '||i_protocol||'.tracking_all';

dbms_sql.parse(c, sql_str, dbms_sql.native);
DBMS_SQL.DEFINE_COLUMN(c, 1, complete);

ignore := dbms_sql.execute(c);
ignore := DBMS_SQL.FETCH_ROWS(c);
DBMS_SQL.COLUMN_VALUE(c, 1, complete);



if complete = 1 then
o_result:= 0;
o_message:= 'Subject is a completer - Page is non-enterable';
ELSE
o_result:= 1;
END IF;



END COMPLETER;