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;

时间: 2024-08-02 10:55:47

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 be retrieved by EXECUTE_QUERY before actually performing it in a database block is especially useful when the requirement is to prevent navigation to

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms

Using GET_APPLICATION_PROPERTY in Oracle D2k Forms DescriptionReturns information about the current Form Builder application. You must call the built-in once for eachvalue you want to retrieve.Usage NotesTo request a complete login, including an appe

DISPLAY_ITEM built-in in Oracle D2k Forms

DISPLAY_ITEM built-in in Oracle D2k Forms DescriptionMaintained for backward compatibility only. For new applications, you should use theSET_ITEM_INSTANCE_PROPERTY built-in. DISPLAY_ITEM modifies an item's appearance byassigning a specified display a

Using Call_Form in Oracle D2k

Using Call_Form in Oracle D2k CALL_FORM examples/* Example 1:** Call a form in query-only mode.*/BEGINCALL_FORM('empbrowser', no_hide, no_replace, query_only);END;/* Example 2:** Call a form, pass a parameter list (if it exists)*/DECLAREpl_id PARAMLI

搭建一个Oracle到Oracle的Goldengate双向复制环境

目标:搭建一个Oracle到Oracle的Goldengate双向复制环境(支持DDL+DML). 环境: OS:Red Hat Enterprise Linux Server release 5.5 (Tikanga) DB:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production gg1和gg2互为source和target,所处OS和所安DB均一样. 一.安装GG 在gg1和gg2都运行例如以下操作: (1

搭建oracle到oracle的Goldengate双向复制环境

目标:搭建一个Oracle到Oracle的Goldengate环境(支持DDL+DML). Goldengate结构介绍: 环境: OS:Red Hat Enterprise Linux Server release 5.5 (Tikanga) DB:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production gg1和gg2互为source和target,所处OS和所安DB均一样. 一.安装GG 在gg1和gg2都

Navicat for Oracle 连接 Oracle 11G 操作流程

Navicat for Oracle 连接 Oracle 11G 操作流程 1 更改Oracle配置文件 在安装完Oracle 11g之后,需要更改C:\Oracle安装基目录\product\11.2.0\dbhome_1\NETWORK\ADMIN下的listener.ora和tnsnames.ora两个文件.记得,要先将这两个文件备份.然后参考下图,将每个文件中的localhost改为Oracle安装计算机的计算机名. 最后,在Windows的运行中,输入services.msc,进入系统

Oracle数据库管理?oracle内部的jdk版本

相看他的自定义版本还是想看兼容SUN的那个版本? 如果是前者,那查询视图:dba_registry, 要是后者就不用查了,ORACLE已经说得很清楚了: oracle8i JVM 兼容 jdk1.2 oracle9i JVM兼容 jdk1.3 oracle10g  VM 兼容 jdk1.4 bash-2.03$ java-version java version "1.2.1" Solaris VM (build Solaris_JDK_1.2.1_04c, native thread

Oracle简易界面工具 (Oracle 10g, Oracle 11g)

Oracle简易界面工具 背景:偶在远程机上干活,须要调用到 Oracle 11gserver的数据,远程机上已安装Oracle client, 但 sql plus 和 sql developer 及 pl sql developer 都不能用 (DBA折腾几天都没解决).偶 有server的ip, oracleusername及password:知道部分表名及字段名. 因时间紧,偶仅仅好自己写一个简易的界面工具来应急. 演示效果:     演示下载: http://pan.baidu.com