Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PL/SQL Procedure does not allow declarations for t.parameters ~ workaround?

AmbaJul 11 2020 — edited Jul 12 2020

Hello group

I am a PL/SQL novice and am trying to get up to speed with it

I seem to have hit a roadblock, however and there is nothing in the documentation that I can find about this... I have looked around this site for something similar..

I want to create a (stored) procedure that will call a WebSource, (so  that I can securely call from a Page. )

However, when I use the  documented example it has a 'declare' section, which APEX's SQL WORKBENCH does not allow.

There is also no "t_parameter" type allowed in the Parameters page in the wizard process for creating a stored procedure. 

Is this intentional or a bug? Or, What am I missing?  Is there a workaround to this?

I refer to :

https://docs.oracle.com/database/apex-18.1/AEAPI/EXECUTE_WEB_SOURCE-Procedure.htm#AEAPI-GUID-30272C98-EA7B-4220-A26B-63DFF9DFCD1F

declare

l_params apex_exec.t_parameters;

begin

  apex_exec.add_parameter( l_params, 'ENAME', :P2_ENAME );

  apex_exec.add_parameter( l_params, 'EMPNO', :P2_EMPNO );

  apex_exec.add_parameter( l_params, 'SAL', :P2_SAL );

  apex_exec.add_parameter( l_params, 'JOB', :P2_JOB );

  apex_exec.execute_web_source(

  p_module_static_id => 'ORDS_EMP',

  p_operation => 'POST',

  p_parameters => l_params );

  :P2_RESPONSE := apex_exec.get_parameter_clob(l_params,'RESPONSE');

end;

many thanks

This post has been answered by jariola on Jul 12 2020
Jump to Answer

Comments

mNem
Answer

did you try right-click on the project name from Projects panel and Copy ... option?

Marked as Answer by OTG-467455 · Sep 27 2020
mNem

If I were you, for "exploring different scenarios", I would just stick with creating a new class (copy the existing one if you like) and make modifications all in the same project (instead of cloning the entire project).

HTH.

OTG-467455

Hi mNem,  Both of your suggestions are good.  I just wanted to create a replica, mess around and then drop it.  So the clone works just right for me.  Thanks for your quick thinking.

1 - 3

Post Details

Added on Jul 11 2020
3 comments
314 views