67
Views
2
Comments
[Oracle Connector P9] How can get more than one output parameter in procedure?
Question
oracle-connector-p9
Web icon
Forge asset by João Grazina

Dear all,


My return structure have 2 outputs parameters, but only the first parameter are getting filled.





Someone can help me?

2021-07-07 13-36-32
Hans Dollen

Hi Renato, 

can you give us some more detail about the pl/sql procedure? It might be e.g. a naming problem, or the returned value is 0 or ''.

Regards,

Hans

2022-07-25 08-42-14
Tiago Resende

Hi Renato,

as Hans Dollen said, we need to see more details about stored procedure; I can give you an example that works for me to try help. For a stored procedure like this:


procedure Lista
          (pIdSolic in  number,
           pTipo    out varchar2,
           pValor   out number
           ) is
 vIdSolic number := pidsolic;

begin
   if vIdSolic is not null then
      pTipo    := 'aa';
      pValor   := 100;
   end if;    
   
end Lista;


We've created this input and outputs:


and use the component this way:


For pTipo we used Text type and for pValor we used Decimal type.

One tip is that the input parameter must be a record and output parameters must be a Record List; another is that field order must be the same in the structures and stored procedure.


Hope this helps.


Regards,


Tiago


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.