ApEx表格摘自Oracle Apex Collection

时间:2011-06-20 13:27:19

标签: oracle oracle-apex

是否可以根据apex_collection创建Oracle Apex表单(带有自动提取行)?

若然,怎么样?

感谢。

4 个答案:

答案 0 :(得分:1)

不,因为您无法直接插入,更新和删除集合数据,您必须调用apex_collectiom API。

答案 1 :(得分:0)

您可以在包含交互式或经典报告的页面中的另一个页面或“预渲染 - >在标题之前 - >处理”中创建集合,其中报告的SQL类似于:

  SELECT c001 as comp_name, c002 as address, c003 as city, 
         n001 as zip_code, clob001 as comp details
   FROM APEX_collections
 WHERE collection_name = 'DEPARTMENTS'


但正如在另一个答案中提到的,您将无法添加/更新/删除数据。

答案 2 :(得分:0)

答案是否定的,因为如果不使用apex_collecion API,您将无法执行DML操作(如插入,更新,删除)。

答案 3 :(得分:0)

declare
    l_order_id    number;
begin
    -- create collections
    --
    apex_collection.CREATE_OR_TRUNCATE_COLLECTION ('CUST_ORDER_ITEMS');


    -- Loop through the ORDER collection and insert rows into the Order Line Item table
    for i in 1..apex_application.g_f01.count loop
        apex_collection.add_member(
            p_collection_name => 'CUST_ORDER_ITEMS',
            p_c001            => to_number(apex_application.g_f01(i)), -- product_id
            p_c002            => to_number(apex_application.g_f02(i)), -- unit_price
            p_c003            => to_number(apex_application.g_f03(i)),  -- quantity
            p_c004            => apex_application.g_f04(i),  -- desc
            p_c005            => apex_application.g_f05(i)  -- unit
        );
    end loop;
end;