zoukankan      html  css  js  c++  java
  • Pre-Query trigger in Oracle D2k / Oracle Forms

    Pre-Query trigger in Oracle D2k / Oracle Forms

    Description
    Fires during Execute Query or Count Query processing, just before Form Builder constructs and issues
    the SELECT statement to identify rows that match the query criteria.
    Definition Level form or block
    Legal Commands
    SELECT statements, unrestricted built-ins
    Enter Query Mode no

    See also:
    Define Custom Filter Using Pre-Query Trigger

    Usage Notes
    Use a Pre-Query trigger to modify the example record that determines which rows will be identified by
    the query.
    On Failure
    The query is canceled. If the operator or the application had placed the form in Enter Query mode, the
    form remains in Enter Query mode.
    Fires In
    COUNT_QUERY
    EXECUTE_QUERY
    Open the Query
    Prepare the Query
    See Process Flowcharts
    Pre-Query trigger examples
    Example
    This example validates or modifies query criteria for a database block query.
    BEGIN
    /*
    ** Set the ORDER BY clause for the current block
    ** being queried, based on a radio group
    ** called ’Sort_Column’ in a control block named
    ** ’Switches’. The Radio Group has three buttons
    ** with character values giving the names of
    ** three different columns in the table this
    ** block is based on:
    **
    ** SAL
    ** MGR,ENAME
    ** ENAME
    */
    Set_Block_Property(’EMP’,ORDER_BY, :Switches.Sort_Column);
    /*
    ** Make sure the user has given one of the two
    ** Columns which we have indexed in their search
    ** criteria, otherwise fail the query with a helpful
    ** message
    */
    IF :Employee.Ename IS NULL AND :Employee.Mgr IS NULL THEN
    Message(’Supply Employee Name and/or Manager Id ’||
    ’for Query.’);
    RAISE Form_trigger_Failure;
    END IF;
    /*
    ** Change the default where clause to either show "Current
    ** Employees Only" or "Terminated Employees" based on the
    ** setting of a check box named ’Show_Term’ in a control
    ** block named ’Switches’.
    */
    IF Check box_Checked(’Switches.Show_Term’) THEN
    Set_Block_Property(’EMP’,DEFAULT_WHERE,’TERM_DATE IS NOT
    NULL’);
    ELSE
    Set_Block_Property(’EMP’,DEFAULT_WHERE,’TERM_DATE IS NULL’);
    END IF;
    END;
  • 相关阅读:
    词法分析程序~总结
    0916 词法分析程序
    0909 编译原理
    1029 文法分析
    0916 编译原理第二次上机作业
    0909 编译原理第一次上机作业
    复利计算之回顾并总结这三次实验
    复利计算之说明代码运行结果和功能点
    操作系统之实验0 了解和熟悉操作系统
    12-16 实验四 递归下降语法分析程序设计
  • 原文地址:https://www.cnblogs.com/quanweiru/p/6220319.html
Copyright © 2011-2022 走看看