Pre-Query trigger in Oracle D2k / Oracle Forms
Pre-Query trigger in Oracle D2k / Oracle Forms
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的更多相关文章
- 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 ...
- Using GET_APPLICATION_PROPERTY in Oracle D2k Forms
Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current ...
- DISPLAY_ITEM built-in in Oracle D2k Forms
DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For ...
- 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 ...
- 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 ...
- CHECKBOX_CHECKED built-in in Oracle D2k Forms
CHECKBOX_CHECKED built-in in Oracle D2k Forms DescriptionA call to the CHECKBOX_CHECKED function ret ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- [php]使用会话session
<?php /* cookie - 在客户端上存储少了信息(cookie) session(会话) - 解决cookie大小限制/数量/其他 setcookie() - 设置cookie 在客户 ...
- 统一使用GPT分区表,安装MAC 10.10 和 Win8.1 pro双系统
步骤一: 为Mac OS 分区,为其它分区留白1,使用OSX Mavericks制作的Mac安装U盘按住Option键启动:2,选择安装Mavericks盘符:3,进入OSX安装启动界面,选择磁盘工具 ...
- Creater中选择一行的方法
1. 在表布局中增加一单选钮列,给单选钮的属性name任意设定一个值.2. 选择单选钮对应列,将其selectID设为单选钮的ID;将onclick设为setTimeout('initAllRow ...
- Serializable 序列化
序列化是指将对象实例的状态存储到存储媒体的过程.在此过程中,先将对象的公共字段和私有字段以及类的名称(包括类所在的程序集)转换为字节流,然后再把字节流写入数据流.在随后对对象进行反序列化时,将创建出与 ...
- javascript,jquery代码规范
jquery代码规范 Coding Standards & Best Practices 中文翻译版:jquery编程的标准写法和最佳实践 javascript代码规范 JavaScript编 ...
- 有三个线程T1 T2 T3,如何保证他们按顺序执行-转载
T3先执行,在T3的run中,调用t2.join,让t2执行完成后再执行t3 在T2的run中,调用t1.join,让t1执行完成后再让T2执行 public class Test { // 1.现在 ...
- ACM第四站————最小生成树(普里姆算法)
对于一个带权的无向连通图,其每个生成树所有边上的权值之和可能不同,我们把所有边上权值之和最小的生成树称为图的最小生成树. 普里姆算法是以其中某一顶点为起点,逐步寻找各个顶点上最小权值的边来构建最小生成 ...
- android异步加载图片并缓存到本地实现方法
图片过多造成内存溢出,这个是最不容易解决的,要想一些好的缓存策略,比如大图片使用LRU缓存策略或懒加载缓存策略.今天首先介绍一下本地缓存图片 在android项目中访问网络图片是非常普遍性的事 ...
- IE6下 input 背景图滚动问题及标签规范
ie6 背景图滚动问题: <title>ie6下input背景图滚动问题</title> <style> .box{ height:20px; width:300p ...
- angularJS directive详解
前言 最近学习了下angularjs指令的相关知识,也参考了前人的一些文章,在此总结下. 欢迎批评指出错误的地方. Angularjs指令定义的API AngularJs的指令定义大致如下 angul ...