Jump to content

Plsql Help Passing Clob In A Procedure


Recommended Posts

Posted

I am trying to fetch a CLOB column from a table through a cursor in a procedure retry_error_message.

select id,error_message from synch; --error_message is a clob type.

and then passing the same to another procedure to enqueue the event, using shell_synch(id,error_message).

message_type is defined as CREATE OR REPLACE TYPE message_type AS OBJECT ( error_message CLOB );

PROCEDURE shell_synch (
in_id IN VARCHAR2,
in_error_message IN message_type)
IS
PRAGMA AUTONOMOUS_TRANSACTION;

C_METHOD_NAME CONSTANT VARCHAR2( 30 ) := 'enqueue_wf_notification';


v_queue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
v_message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
r_message_id RAW(16);
BEGIN

v_message_properties.correlation := in_id;

-- First let's enqueue!
DBMS_AQ.ENQUEUE(
queue_name => 'cp_synchronization',
enqueue_options => v_queue_options,
message_properties => v_message_properties,
payload => in_error_message ,
msgid => r_message_id );.

But when I compile retry_error_message

 I have been getting error as wrong number or types of arguments in call to shell_synch.

I even tried declaring a variable in retry_error_message with message_type and passing error_message to the defined variable. And then calling the procedure with the defined variable. Still face the same error. Can someone please help on this?

×
×
  • Create New...