Skip to Main Content

Validate Stored Procedure Input

ChristianM0147Jun 2 2022 — edited Jun 2 2022

Hello fellow ADF Programmers
I´m currently working with JDeveloper Version
My Scenario: I created a Methode in my that calls a procedure in my Database. I exposed this Method to the Client so i can use the DataControl on my page. The procedure/Method takes a *ID as an Input Parameter. My procedure does this: INSERT INTO X Select * FROM Y WHERE Y.ID = *ID.
I now want to implement a validation of the input field (*ID). I want to check if the data of *ID is already inserted in table X and if so... show some validation error the button on my .jsf page. Whats the best way to do this?
Should i just extend the method in my AppModule with: Select 1 from X where id = *ID and then throw a ValidatorException if the select returns something?

This post has been answered by Karl Karanjia-Oracle on Jun 2 2022
Jump to Answer
Post Details
Added on Jun 2 2022
1 comment