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. 【py分析】

    pyQuery pyQuery 是 jQuery 在 python 中的实现,能够以 jQuery 的语法来操作解析 HTML 文档,十分方便.使用前需要安装,easy_install pyquery ...

  2. 161114、websocket实现心跳重连

    心跳重连缘由 在使用websocket过程中,可能会出现网络断开的情况,比如信号不好,或者网络临时性关闭,这时候websocket的连接已经断开, 而浏览器不会执行websocket 的 onclos ...

  3. Android剪切板传递数据传递序列化对象数据

    一.剪切板的使用介绍 1. 剪切板对象的创建 使用剪切板会用到,ClipboardManager对象,这个对像的创建不可以使用构造方法,主要是由于没有提供public的构造函数(单例模式),需要使用A ...

  4. 【jQuery UI 1.8 The User Interface Library for jQuery】.学习笔记.1.CSS框架和其他功能

    jquery.ui.all.css 1.所有主题必须的文件都包含在这个文件中.它由ui.base.css和ui.them.css两个文件中拉入的@import执行构成. jquery.ui.base. ...

  5. ectouch第六讲 之表常用链接

    ECTouch1.0 常用链接:精品属性商品mobile/index.php?m=default&c=category&type=best 新品属性商品mobile/index.php ...

  6. PHP的Socket通信之UDP篇

    1.创建一简单的UDP服务器 //服务器信息 $server = 'udp://127.0.0.1:9998'; //消息结束符号 $msg_eof = "\n"; $socket ...

  7. YTU 2973: C语言习题5.25--文件操作2

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

  8. MVC模式:实现数据库中数据的增删改查功能

    *.数据库连接池c3p0,连接mysql数据库: *.Jquery使用,删除时跳出框,确定是否要删除: *.使用EL和JSTL,简化在jsp页面中插入的java语言 1.连接数据库 (1)导入连接数据 ...

  9. PreparedStatement接口及其方法的使用

    PreparedStatement接口是Statement接口的子接口,使用它的好处有三个 一:简化代码,便于sql语句的书写 二:有效的禁止sql语句的注入,例如:用户名和密码,使用Prepared ...

  10. The Cow Lexicon

    The Cow Lexicon Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8815 Accepted: 4162 Descr ...