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 ...
随机推荐
- vim - mark
Using markshttp://vim.wikia.com/wiki/Using_marks1. There is no visible indication of where marks are ...
- 搭建git for windows服务器(100%可以成功)
既然Git在Linux下面非常好用,为什么还要搭建git windows的服务器,因为不是所有的用户都需要在linux下面做开发,对吧,还有很多用户选择使用windows做开发. 看到很多网友尝试部分 ...
- 解决一阻塞语句CPU直降15%
原本只是部署作业获取数据库中阻塞语句,中午测试汇集阻塞数据,发现某一服务器写入386行,而其他服务器只写入几行.登录对应服务器查看详细信息,发现有四个时间点分别写入100来行记录对于第一行:会话183 ...
- Gulp: Getting Started
https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md 1. Install gulp globally: $ npm i ...
- 使用EF Oracle实现DevExpress绑定大数据的ServerMode模式
前提:需要引入EntityFramework组件,注意几个使用点后使用上其实比较简单. 一.引入Oracle EF支持组建 1.可手动引入附件中的DLL(需手动合并web.config配置) 2.也可 ...
- 一些CSS
/*自定义*白烟*文本/边框/背景色*/ .text-whitesmoke,a.text-whitesmoke:link,a.text-whitesmoke:visited,.button.borde ...
- Android系统调用
android 中intent是经常要用到的.不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent. 在做了一些intent的例子之后,整理了一下intent,希望对大家有用. ...
- 添加群组表AppGroup和群组详细表AppGroupDetails
添加群组表AppGroup和群组详细表AppGroupDetails CREATE TABLE [dbo].[AppGroup]( ) NOT NULL PRIMARY KEY, ) NOT NULL ...
- 802.1X基础
这是一个认证规范.使用EAPOL协议在客户端与认证端交互. EAPOL协议:Extensible Authentication Protocol over LAN. 假设三个实体: 客户端:PC 认证 ...
- 移动端 iframe的使用
对于iframe的设定有几个css属性常用 overflow:hidden;width:100%;当这样使用inframe内部中使用overflow,iframe会被撑开,导致width与overfl ...