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;

Pre-Query trigger in Oracle D2k / Oracle Forms的更多相关文章

  1. Obtaining Query Count Without executing a Query in Oracle D2k

    Obtaining Query Count Without executing a Query in Oracle D2k Obtaining a count of records that will ...

  2. Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

    Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current ...

  3. DISPLAY_ITEM built-in in Oracle D2k Forms

    DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For ...

  4. Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock

    Creating Timer in Oracle D2k / Forms 6i and Displaying a Clock This is about timer in D2k An externa ...

  5. Refresh / Updating a form screen in Oracle D2k Forms 6i

    Refresh / Updating a form screen in Oracle D2k Forms 6i ProblemYou want to show number of records pr ...

  6. CHECKBOX_CHECKED built-in in Oracle D2k Forms

    CHECKBOX_CHECKED built-in in Oracle D2k Forms DescriptionA call to the CHECKBOX_CHECKED function ret ...

  7. Creating List Item in Oracle D2k

    Special Tips for List Items in Oracle D2k In this section, I shall discuss some special tips and tec ...

  8. Creating Object Library OLB in Oracle D2k Form

    With following steps you can create Object Library (OLB) in Oracle D2k Forms.Step - 1Create a form i ...

  9. Using Call_Form in Oracle D2k

    Using Call_Form in Oracle D2k CALL_FORM examples/* Example 1:** Call a form in query-only mode.*/BEG ...

随机推荐

  1. 白盒测试的学习之路----(五)TestNG的参数分离

    之前的测试用例直接嵌套在代码中,不便于维护和测试设计,应该单独把测试用例放在excel内,然后程序从中读取数据到相应的接口内即可.使用ava程序对Microsoft Office格式档案读和写的功能提 ...

  2. zw版【转发·台湾nvp系列例程】HALCON MirrorRegion (Delphi)

    zw版[转发·台湾nvp系列例程]HALCON MirrorRegion (Delphi) procedure TForm1.Button1Click(Sender: TObject);var img ...

  3. 【py】配置python环境

    首先,在ubuntu 10.10之后的版本中,要这样安装 sudo apt-get install python-pip python-dev build-essential sudo pip ins ...

  4. 《Focus On 3D Terrain Programming》中一段代码的注释三

    取自<Focus On 3D Terrain Programming>中的一段: //--------------------------------------------------- ...

  5. onTouch和onTouchEvent

    public boolean dispatchTouchEvent(MotionEvent event) { if (mOnTouchListener != null && mOnTo ...

  6. linux 程序或服务开机自启动

    chkconfig --level 35 服务名 on或写启动脚本到/etc/rc.local/下

  7. declare和typeset DEMO

    declare=typeset,用法完成相同. declare不指定变量:显示所有变量的值. -r选项,把指定变量定义为只读变量: [xiluhua@vm-xiluhua][~]$ declare - ...

  8. css 样式设计(一)( 在线150个例子 | 背景 | 文本 | 字体 | 链接 | 列表 | 表格 | 盒模型 | 边框 | 轮廓 | 边距 | 填充 |分组和嵌套 | 尺寸 | 定位 | 浮动 |对齐 )

    一.css在线150个例子 http://www.w3cschool.cc/css/css-examples.html 二.背景图片水平方向重复 : body { background-image:u ...

  9. YTU 2974: C语言习题5.26--文件操作3

    2974: C语言习题5.26--文件操作3 时间限制: 1 Sec  内存限制: 128 MB 提交: 213  解决: 92 题目描述 文本文件score.dic 中存储了n名学生的信息(班级编号 ...

  10. ThreadLocal的使用及介绍

    ThreadLocal总结 1.ThreadLocal使用场合主要解决多线程中数据数据因并发产生不一致问题.ThreadLocal为每个线程的中并发访问的数据提供一个副本,通过访问副本来运行业务,这样 ...