Obtaining Query Count Without executing a Query in Oracle D2k
Obtaining Query Count Without executing a Query in Oracle D2k
FUNCTION query_count (p_block_name VARCHAR2) RETURN NUMBER
IS
cnt NUMBER;
BEGIN
GO_BLOCK(p_block_name);
COUNT_QUERY;
cnt := GET_BLOCK_PROPERTY(p_block_name, QUERY_HITS);
IF FORM_SUCCESS THEN
RETURN (cnt);
ELSE
MESSAGE('Error in getting Query Hits for block '||:SYSTEM.CURRENT_BLOCK);
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
WHEN-BUTTON-PRESSED trigger of 'Details'button
DECLARE
v_cnt NUMBER;
BEGIN
v_cnt := query_count(<detail block name>);
IF (v_cnt = 0) THEN
p_show_alert('No Details exist.');
ELSE
GO_BLOCK(<detail block name>);
EXECUTE_QUERY;
END IF;
END;
- COUNT_QUERY is necessary to initiate the QUERY_HITS property of the block and should be immediately before the GET_BLOCK_PROPERTY statement.
- Oracle Forms displays the message FRM-40355: Query will display 0 records when the query hits are zero as obtained by a call to COUNT_QUERY. This should be suppressed in an ON-MESSAGE trigger by using the following code:
if message_type = 'FRM'and message_code = 40355 then null; else message(message_type||'-'||to_char(message_code)||': '||message_text); end if;
Obtaining Query Count Without executing a Query in Oracle D2k的更多相关文章
- java.sql.SQLException: Column count doesn't match value count at row 1 Query: insert into category values(null,?,?,?) Parameters: [1111111, 1111, 软件]
java.sql.SQLException 问题: java.sql.SQLException: Column count doesn't match value count at row 1 Que ...
- Elasticsearch由浅入深(九)搜索引擎:query DSL、filter与query、query搜索实战
search api的基本语法 语法概要: GET /_search {} GET /index1,index2/type1,type2/_search {} GET /_search { , } h ...
- SpringData系列四 @Query注解及@Modifying注解@Query注解及@Modifying注解
@Query注解查询适用于所查询的数据无法通过关键字查询得到结果的查询.这种查询可以摆脱像关键字查询那样的约束,将查询直接在相应的接口方法中声明,结构更为清晰,这是Spring Data的特有实现. ...
- FunDA(1)- Query Result Row:强类型Query结果行
FunDA的特点之一是以数据流方式提供逐行数据操作支持.这项功能解决了FRM如Slick数据操作以SQL批次模式为主所产生的问题.为了实现安全高效的数据行操作,我们必须把FRM产生的Query结果集转 ...
- 【Lucene4.8教程之六】QueryParser与Query子类:如何生成Query对象
一.概述 1.对于一个搜索而言,其核心语句为: searcher.search(query, 10); 此时,其最重要的参数为一个Qeury对象.构造一个Query对象有2种方法: (1)使用Quer ...
- Elasticsearch Query DSL 整理总结(三)—— Match Phrase Query 和 Match Phrase Prefix Query
目录 引言 Match Phase Query slop 参数 analyzer 参数 zero terms query Match Phrase 前缀查询 max_expansions 小结 参考文 ...
- 【Lucene4.8教程之六】QueryParser与Query子类:怎样生成Query对象
版权声明:本文为博主原创文章.转载请注明来自http://blog.csdn.net/jediael_lu/ https://blog.csdn.net/jediael_lu/article/deta ...
- LINQ Query Expressions
https://msdn.microsoft.com/en-us/library/bb397676(v=vs.100).aspx Language-Integrated Query (LINQ) is ...
- WebForm控件Repeater
我们会发现用拼接字符串来显示一个查询非常的麻烦,有一个控件Repeater帮助你,省去写Foreach LinQ to SQL类 函数类: using System; using System.Col ...
随机推荐
- iOS控件之UIResponder类
iOS控件之UIResponder类 在iOS中UIResponder类是专门用来响应用户的操作处理各种事件的,我们知道UIApplication.UIView.UIViewController这几个 ...
- C#正则表达式判断输入日期格式是否正确
/// <summary> /// 是否为日期型字符串 /// </summary> /// <param name=&qu ...
- ZooKeeper的Znode剖析
在ZooKeeper中,节点也称为znode.由于对于程序员来说,对zk的操作主要是对znode的操作,因此,有必要对znode进行深入的了解. ZooKeeper采用了类似文件系统的的数据模型,其节 ...
- Flipboard-BottomSheetlayout 源码分析
BottomSheetLayout BottomSheet:Google在API 23中已经加入了这样的一个控件. BottomSheet介绍: BottomSheet是一个可以从底部飞入和飞出的An ...
- 用node-inspector调试Node.js(转自NOANYLOVE'S BLOG)
原文地址:http://www.noanylove.com/2011/12/node-the-inspector-debugging-node-js/ 用node-inspector调试Node.js ...
- ios safari 标签发送到桌面自定义图标方法
iphone 修改safari 发送到桌面图标 试了几次,总结如下: 1.全屏方法 <meta name="viewport" content="width=dev ...
- CF 484E - Sign on Fence
E. Sign on Fence time limit per test 4 seconds memory limit per test 256 megabytes input standard in ...
- 2015最新德淘W家(Windeln.de)新人优惠码wcode0520,赠1000积分,可抵10欧元
德淘W家(Windeln.de)网址:www.windeln.de 德淘W家(Windeln.de)的新人优惠码wcode0520 第一次购物结账时输入wcode0520,提交订单,1000积分划入你 ...
- QT 网络编程
#include "networkinformation.h" #include "ui_networkinformation.h" networkinform ...
- Java面试宝典系列之基础排序算法
本文就是介绍一些常见的排序算法.排序是一个非常常见的应用场景,很多时候,我们需要根据自己需要排序的数据类型,来自定义排序算法,但是,在这里,我们只介绍这些基础排序算法,包括:插入排序.选择排序.冒泡排 ...