Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Inserting/updating several tables in a single transaction with validation at DB level

PaMiDeMay 25 2020 — edited Jun 8 2020

Hi!

I have this overwhelming problem. I'm am quite new to APEX and this is quite taugh! Can I ask you for suggestions on how to solve this problem?

Well, I have several master detail tables and I have to prepare a page that is able to insert / update all this tables in a single transaction. The main problem is that there is a complex procedure (Oracle DB procedure) that validates the entire transaction. The procedures uses data from all the tables involved in the transaction and some other too.

Till now I've created only simple pages with DML forms based on views that validates the DML based on triggers at the view level. Using triggers does not ensure a transaction involving several tables.

There is a second problem: there are something like a hundred details that should pop-up in a dialog for DML operations. I don't want to create hundreds of regions, so I've created a view that have triggers to decide where to save the data and I've created one region. Only that as soon as the user updates one detail and opens the same region to update another detail, the first operation (that I cannot commit) is lost.

I thought that it might be possible to use collections where I save everything, then, when submitting the page, I pass all to a procedure that validates the data and saves all in the DB. So the form is not a DML form. Only that I know nothing about collections and I don't know if it is possible.

Do you have any suggestion on how to solve this problem?

Thanks,

Miky

Comments
Post Details
Added on May 25 2020
6 comments
680 views