sofiagomes
IS-IT--Management
I'm using this code to execute a list of stored procedures:
EXEC SQL EXECUTE
DECLARE
X NUMBER;
MSG_ERRO VARCHAR2(255);
cursor_handle INTEGER;
procedure_run INTEGER;
BEGIN
cursor_handle := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_handle,roc_operation,DBMS_SQL.V7);
DBMS_SQL.BIND_VARIABLE(cursor_handle,':X',999);
DBMS_SQL.BIND_VARIABLE(cursor_handle,':MSG_ERRO',' ',255);
procedure_run := DBMS_SQL.EXECUTE (cursor_handle);
DBMS_SQL.VARIABLE_VALUE(cursor_handle,'X',:nr_returned);
DBMS_SQL.VARIABLE_VALUE(cursor_handle,'MSG_ERRO',:err_returned);
DBMS_SQL.CLOSE_CURSOR (cursor_handle);
EXCEPTION
WHEN OTHERS
THEN
DBMS_SQL.CLOSE_CURSOR (cursor_handle);
END; END-EXEC;
Can anyone help to solve the problem ORA-01405? "fetched column is null"
Thanks
EXEC SQL EXECUTE
DECLARE
X NUMBER;
MSG_ERRO VARCHAR2(255);
cursor_handle INTEGER;
procedure_run INTEGER;
BEGIN
cursor_handle := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor_handle,roc_operation,DBMS_SQL.V7);
DBMS_SQL.BIND_VARIABLE(cursor_handle,':X',999);
DBMS_SQL.BIND_VARIABLE(cursor_handle,':MSG_ERRO',' ',255);
procedure_run := DBMS_SQL.EXECUTE (cursor_handle);
DBMS_SQL.VARIABLE_VALUE(cursor_handle,'X',:nr_returned);
DBMS_SQL.VARIABLE_VALUE(cursor_handle,'MSG_ERRO',:err_returned);
DBMS_SQL.CLOSE_CURSOR (cursor_handle);
EXCEPTION
WHEN OTHERS
THEN
DBMS_SQL.CLOSE_CURSOR (cursor_handle);
END; END-EXEC;
Can anyone help to solve the problem ORA-01405? "fetched column is null"
Thanks