How to pass new PK to stored proc in Oracle Apex

試著忘記壹切 提交于 2019-12-13 00:26:46

问题


I have your standard Oracle apex page to create / edit / delete a record.

I now wanted to call a stored proc when a new record is created (only on INSERT, not update/delete), so I created a Process on the page and tied it to the create button.

All is well so far....it calls the stored procedure as expected as verified by the debug messages I put in there. However, I wanted to pass the new PK created as part of the new record to the stored proc. However it is receiving null.

The process I created is set to run "On Submit - after Computations and Validations" which I think is right.

Can someone suggest why I might not be getting the new key? Is it still not available yet at that point in the form processing?

Any help appreciated.


回答1:


If you are using a standard Apex "form on a table", then you can set the Return Key into Item property of the Process Row of ... process to specify a page item that will get populated with the PK of the inserted row:

You can then reference the item in your procedure call.



来源:https://stackoverflow.com/questions/7689620/how-to-pass-new-pk-to-stored-proc-in-oracle-apex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!