78
Views
8
Comments
[Oracle Connector - P11] Calling Oracle stored procedure with LOB output parameters
oracle-connector-p11
Web icon
Forge asset by Eduardo Oliveira
Application Type
Service
Service Studio Version
11.12.3 (Build 50494)
Platform Version
11.10.2 (Build 25738)

I'm calling an Oracle stored procedure that returns two parameters, a CLOB and a BLOB:

  • For the CLOB, the corresponding variable in OutSystems is of type TEXT. For large CLOBs I get an error (ORA-06502: PL/SQL: numeric or value error )
  • For the BLOB, the corresponding variable in OutSystems is of type BINARY. But I get error (unsupported type : System.Byte[]).

Any ideas how to do this?

2017-10-19 17-43-31
Khalil Dahham

Thank you but I'm not concerned about performance or storing LOBs. My question is how to return them as output parameters when calling an Oracle stored procedure.

2021-08-30 15-28-09
Leandro Correa

Hi Khalil,

The first error is happening in the Oracle database, so can you ask help for some DBA? 

The second one, I recommend check the data coming from the database and if it is ok, check the parse data in the C# code.

2017-10-19 17-43-31
Khalil Dahham

The procedure works well on it's own. But when called from OutSystems, TEXT type does not correctly represent a CLOB, and BINARY type does not correctly represent a BLOB.

2025-01-12 10-53-58
MatheusLima

Hello, Khalil!

Do you found some solution for your problem? Im in the same problem.

2017-10-19 17-43-31
Khalil Dahham


I'm sorry I didn't find a solution. I couldn't use a BLOB parameter and I had to modify the application to use smaller CLOBs.

2025-01-12 10-53-58
MatheusLima

Hello Khali, thanks for answers.

I'm already using clobs but I still with problem to use the connector. I used it in a less complex procedure (3 number in, 2 varchar out) and its works well, but now I'm trying to use it in a other procedure and it dont works, I'm having some oracle error (I did a lot of testes).

The procedure have this param:

PROCEDURE pr_gama_entidade(

p_useruid IN NUMBER , 

p_id_entidade IN NUMBER , 

p_id_gama_entidade IN OUT NUMBER, 

p_data_atribuicao IN DATE ,

p_lim_inf IN VARCHAR2, 

p_lim_sup IN VARCHAR2 , 

p_mng_type IN VARCHAR2, 

p_status OUT NUMBER , 

p_insucessos OUT CLOB)

Structures: (P_INSUCESSOS_CLOB are defined with Type: Text)

Assign paramIn


But, when I call it, the response is:

{"Errors":["ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'PR_GAMA_ENTIDADE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"],"StatusCode":500}


Could u see something wrong?

2025-01-12 10-53-58
MatheusLima

Returning here, I found the problem and its was caused by the parameter IN OUT, I change it for only OUT and its works... I'll check the component to try solve this problem in the source.


Thanks

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