0

I have written a pl sql procedure which updates a column in the ATP Database table. The procedure is as follows -

CREATE OR REPLACE PROCEDURE updateFlag(   
p_unique_id in table.UNIQUE_ID%TYPE)  
IS  
BEGIN  
UPDATE table SET enabled_flag = 'Y' WHERE unique_id = p_unique_id;  
COMMIT;  
END;  
/    

I want to call this procedure inside a Javascript function because this procedure should be called only if another function returns success. Is there any way to call a PL-SQL procedure inside a JS function? (the database being used is ATP Database and the application is built using Visual Builder Cloud Services)

4
  • 3
    Are you just looking for a Node package for accessing Oracle? Commented May 2, 2022 at 15:19
  • 3
    one way would be your js to call out to a REST API that fires the procedure. Autonomous Database makes it easy to expose your plsql program via REST API. Commented May 2, 2022 at 15:29
  • @thatjeffsmith yeah thats one way but since i am using Visual Builder Cloud Services (VBCS), i cannot make a call to REST API in between the function. i need to make the call before or after the function or else ill have to modify the whole function. Commented May 4, 2022 at 8:29
  • You may try reference from Link(stackoverflow.com/questions/34534653/…) Commented May 9, 2022 at 13:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.