oracle 使用 PLSQL 更新 Apex 表格形式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3962731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Update Apex Tabular form with PLSQL
提问by maximus
How can I update an Apex Tabular Form with pl/sql instead of using a multi-row update(MRU), is it even possible?
如何使用 pl/sql 而不是使用多行更新(MRU)更新 Apex 表格,甚至可能吗?
Thanks in advance.
提前致谢。
采纳答案by Tony Andrews
Yes, it is possible. You can delete (or disable) the standard processes such as ApplyMRU, and replace them with your own PL/SQL processes to handle the tabular form arrays something like this:
对的,这是可能的。您可以删除(或禁用)诸如 ApplyMRU 之类的标准进程,并用您自己的 PL/SQL 进程替换它们来处理表格形式的数组,如下所示:
for i in 1..apex_application.g_f02.count loop
update dept
set dname = apex_application.g_f03(i)
where deptno = apex_application.g_f02(i);
end loop;
However, it isn't simple and there is a fair bit you need to know to get this right, such as:
但是,这并不简单,您需要了解一些知识才能做到这一点,例如:
- How the tabular form columns map to arrays like apex_application.g_f03 (view the page source and look for the names of the controls, e.g. "f03_0001").
- How some item types like checkboxes a work differently to others
- How to perform optimistic locking to prevent lost updates
- 表格形式的列如何映射到像 apex_application.g_f03 这样的数组(查看页面源代码并查找控件的名称,例如“f03_0001”)。
- 某些项目类型(例如复选框)的工作方式与其他项目类型有何不同
- 如何执行乐观锁定以防止丢失更新
There used to be a "how to" document on apex.oracle.com that described this in detail, but I haven't been able to locate it recently.
apex.oracle.com 上曾经有一个“如何”文档详细描述了这一点,但我最近无法找到它。

