How to execute Oracle Stored Procedures and get the output using UiPath?
Can you give more details about the stored procedures means?
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
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
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