This discussion is archived
5 Replies Latest reply: Oct 8, 2012 3:46 AM by Prabodh RSS

retriewing values of out parameters in a stored procedure

Fabrizio Delli Priscoli Journeyer
Currently Being Moderated
Hi all. I'm on Application Express 4.0.2.00.07.
I have made a region with a text item in which I put a sql statement. Then I want to pass this statement to a stored procedure.
So I have created a page process in which I made the call to this procedure.
I put in the process point section "On submit after computations and validation" and in the source I have made the call to my procedure,
CALCOLA_RECORD_DINAMICO(:P1_ATEMENT,:P1_RECORD,:P1_T_VAL,:P1_T_QUA,:P1_T_QAU);

:P1_ATEMENT is a text item in which I put the statement I want to process, the others are item where I must store returning values of my procedure.

Here is the code of my procedure:

create or replace
procedure calcola_record_dinamico(statement in varchar2,n_record out number, tot_val out number, tot_qua out number, tot_qau out number) is

begin
execute immediate statement into n_record, tot_val, tot_qua, tot_qau;
end;
/


I have made a button in the page in order to submit the process, and in the "Action When Button Clicked" section I put submit page, execute validation and no database action.

When I run and press the button, nothing happens, because items that must store returning values of procedure still remain null.
Where am I wrong??
Thanks all for collaboration,
Fabrizio

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points