Error getting Stored Procedure Output

The stored procedure is returning some data, which is not handled properly. Can you tell me what it returns and how are you calling the procedure from UiPath ?

Hello @skini76

The return of my procedure is just a message.
I used the Execute Query Activity to call the procedure. I set the Command Type to Stored Procedure. Please see screenshot below. Thanks

Can you share the procedure ?

Hello Sukrutha,

Please see below is the Procedure I created. It only returns a message.

create or replace PROCEDURE INSERT_DATA

(

I_ID IN VARCHAR2,

I_PRODUCT_NAME IN VARCHAR2,

I_PRODUCT_PRICE IN VARCHAR2,

I_PRODUCT_DATE_ADDED IN VARCHAR2,

I_BOOKING_DT IN VARCHAR2,

O_MSG OUT VARCHAR2

) AS

BEGIN

INSERT INTO TEST_TABLE(

ID, PRODUCT_NAME, PRODUCT_PRICE, PRODUCT_DATE_ADDED, BOOKING_DT)

VALUES (

I_ID, I_PRODUCT_NAME, I_PRODUCT_PRICE, I_PRODUCT_DATE_ADDED, I_BOOKING_DT);

O_MSG := ‘Successful Insert’;

COMMIT;

EXCEPTION

WHEN OTHERS THEN

ROLLBACK;

O_MSG := ‘Failed’;

END INSERT_DATA;

@skini76 ,

Hi, yes sure, I will show my sample stored procedure I created.

your out parameter msg to too long and it is not able to bind to output variable., just try to execute the same procedure from your SQL server and have a look what it is returning and make sure it doesnot exceed the argument limit.

@Divyashreem

Hi, thank you for your response.

As screenshot below, the only output I am returning is a string which contains the word “Successful Insert” or “Failed”.

image

I also tried changing the data type to CHAR and only output “A” or “B”, but still it is not working.

But when I tried to change the data type to NUMBER, it is working properly without any error.
That’s why I don’t know what’s the issue when I am returning a string.

ok last option to solve this, instead of returning string try to return integer only 0 and 1 since you know when you passing what, once after you hvae that value in Uipath you can convert(assign 1->success and 0->failure).

Hi @Divyashreem

but what if i want to return a string? or a list of strings?

for now we do not have options for that in UiPath