zoukankan      html  css  js  c++  java
  • How To Use FETCH_RECORDS In Oracle Forms

    When called from an On-Fetch trigger, initiates the default Form Builder processing for fetching records
    that have been identified by SELECT processing.

    FETCH_RECORDS examples
    /*
    ** Built-in: FETCH_RECORDS
    ** Example: Perform Form Builder record fetch processing
    during
    ** query time. Decide whether to use this built-in
    ** or a user exit based on a global flag setup at
    ** startup by the form, perhaps based on a
    ** parameter. The block property RECORDS_TO_FETCH
    ** allows you to know how many records Form Builder
    ** is expecting.
    ** trigger: On-Fetch
    */
    DECLARE
    numrecs NUMBER;
    BEGIN
    /*
    ** Check the global flag we set during form startup
    */
    IF :Global.Using_Transactional_Triggers = ’TRUE’ THEN
    /*
    ** How many records is the form expecting us to
    ** fetch?
    */
    numrecs := Get_Block_Property(’EMP’,RECORDS_TO_FETCH);
    /*
    ** Call user exit to determine if there are any
    ** more records to fetch from its cursor. User Exit
    ** will return failure if there are no more
    ** records to fetch.
    */
    User_Exit(’my_fetch block=EMP remaining_records’);
    /*
    ** If there ARE more records, then loop thru
    ** and create/populate the proper number of queried
    ** records. If there are no more records, we drop through
    ** and do nothing. Form Builder takes this as a signal that
    ** we are done.
    */
    IF Form_Success THEN
    /* Create and Populate ’numrecs’ records */
    FOR j IN 1..numrecs LOOP
    Create_Queried_Record;
    /*
    ** User exit returns false if there are no more
    ** records left to fetch. We break out of the
    ** if we’ve hit the last record.
    */
    User_Exit(’my_fetch block=EMP get_next_record’);
    IF NOT Form_Success THEN
    EXIT;
    END IF;
    END LOOP;
    END IF;
    /*
    ** Otherwise, do the right thing.
    */
    ELSE
    Fetch_Records;
    END IF;
    END;


  • 相关阅读:
    2020/12/27
    2020/12/25 the light
    2020/12/25
    2020/12/23
    2020/12/22
    美加大量银行用户遭攻击,这些黑客到底牛到什么程度?
    揭秘马云的蚂蚁科技“整改”计划
    大众集团成功研发:可移动的电动汽车充电器,网友:太方便了
    东方联盟郭盛华的江湖往事
    5种方法!疫情期间防御恶意软件,网络钓鱼和诈骗
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220589.html
Copyright © 2011-2022 走看看