Execute Stored Procedures and Get the Output parameter using UiPath

How to execute Oracle Stored Procedures and get the output using UiPath?

Can you give more details about the stored procedures means?

1 Like

DECLARE
value varchar2(50);
proc_statement varchar2(50);
BEGIN
proc_statement:=ā€˜BEGIN nameOfTheStoredProcedure(:1); END;ā€™;
EXECUTE IMMEDIATE proc_statement USING OUT value;
END;

Iā€™m executing this using Execute Query activity. But it should return a string value for the output parameter. But it canā€™t access using the UiPath activity.

Hi @dilii,

Take a look at this thread both suggested solutions will work.

Your output will be off course be a datatable type.

Since you will have only one row output, you can then use

Assign activity

SQL output (string type) = YourResultDatatable.Rows(0).Item("YourColumnName").ToString

1 Like

Hi @dilii,
Did you find any solution? Iā€™m also facing same issue.

Hi @jeevith ,
In my case, the stored procedure is returning a String as output argument.

DECLARE
  ACCOUNT_NUMBER VARCHAR2(32767);
  ORDER_ID VARCHAR2(32767);

BEGIN
  ACCOUNT_NUMBER:= '12345';
  ORDER_ID := NULL;
  storedProcedureName( ACCOUNT_NUMBER, ORDER_ID);
  DBMS_OUTPUT.PUT_LINE ( 'ORDER_ID = ' || ORDER_ID );
  COMMIT;
END;

When I execute it from UiPath, it is not returning any value in UiPath. How can I get the ā€˜ORDER_IDā€™ā€¦?

Regards,
Krishnakanth K

ā€œYour output will be off course be a datatable typeā€

Why are you inventing this answers for the sake of getting points or whatever?

It doesnā€™t work, and the stored procedure is not returning ā€œrowsā€.

It would be better if people refrained from answering stuff they donā€™t know and/or didnā€™t bother trying.

As per the suggested solution in the above post: the method has been working for us for the past 3 years for over 3 million transactions. I am not inventing answers, I volunteer my time much like others do here and do not do this for any points. You can read my opinion on the rewards program here :medal_sports: :moneybag: Monthly Forum rewards! - News / Events - UiPath Community Forum

In addition, the solution post you tagged me was made 2 years ago when there were no monthly rewards.

@pere, please refrain from making personal attacks. This is the UiPath forum and NOT Stackoverflow! This is a violation of the forum / community policy. @loginerror

Dont like the message? Dont blame the messenger.

I do recommend you take the time in reviewing this thread: Forum FAQ - Beginnerā€™s guide which has detailed threads on different topics.

Also remember the values of this forum

  • Be friendly
  • Be helpful
  • Be considerate

------------------------------------------------||---------------------------------

Such messages do not provide enough information to forum members to help you out. Some details on what you tried, what went wrong, error information, what was the scenario can help forum members troubleshoot your issues faster.

Jeevith,

The original question is not related to passing parameters, but about collecting the output.

The stored procedure is not a query to a table, so itā€™s not returning a row and, as per the user asking, itā€™s returning merely a string. So the link you provided will not work for hime; itā€™s misleading and rather different than the problem the user is facing.

Thereā€™s a number of answers in similar threads that are simple not working, as the last question in this thread itself. Anything regarding DBMS_OUTPUT.PUT_LINE will simply not work, and I have yet to find out if thereā€™s another feasible way to accomplish this.

Iā€™m sorry if the ugly truth sounded rude to you. And sorry if it is not your case, but thereā€™s a lot of people on this forum who merely reply to get points for whatever reward, and these answers are mere rubbish like 50% the times.

Regards,
Pere