Copy Records From One Data Block To Another Data Block In Oracle Forms
In this tutorial you will learn to copy the records from one data block to another data block on same form and on a same canvas in Oracle Forms.
Below is the screen shot of the form and you can download this form for your reference from the following link (Table script is also included):
In the above picture you can see that there are two blocks, first one is the block based on a table and the second one is a non-database data block, but this is not necessary you can make the block based on a table also.
The functionality of this form is, user will select the record above then click on Copy button to copy the record below, it is like making the selection of records from a data block. User can also remove the records from the second block where the records are being copied.
The whole functionality is written on the push button Copy and below is the code written on When-Button-Pressed trigger:
BEGIN
GO_BLOCK ('COPIED');
FIRST_RECORD;
LOOP
-- CHECK THE VALUE IF RECORD IS EMPTY IF NOT THEN JUMP TO ANOTHER
IF :copied.empno IS NULL
THEN
-- EXIT TO COPY THE RECORD
EXIT;
END IF;
-- ELSE CONTINUE FINDING EMPTY RECORD
IF :SYSTEM.LAST_RECORD = 'TRUE'
THEN
CREATE_RECORD;
EXIT;
END IF;
NEXT_RECORD;
END LOOP;
-- COPY THE RECORD
:copied.empno := :scott_emp.empno;
:copied.ename := :scott_emp.ename;
:copied.job := :scott_emp.job;
:copied.mgr := :scott_emp.mgr;
:copied.hiredate := :scott_emp.hiredate;
:copied.sal := :scott_emp.sal;
:copied.comm := :scott_emp.comm;
:copied.deptno := :scott_emp.deptno;
-- GO BACK TO FIRST BLOCK
GO_BLOCK ('SCOTT_EMP');
END;
You should replace the value of data block and item reference (:copied.empno := :scott_emp.empno) with your form's data block and items.
Below is the code of Remove push button of second data block to clear the record when pressed:
CLEAR_RECORD;
Just a One line code which is sufficient.
Copy Records From One Data Block To Another Data Block In Oracle Forms的更多相关文章
- Moving From Top To Bottom in Detailed Block in Oracle Forms
Suppose you want to scan a tabular grid block (loop through all records in detail block) from top to ...
- Create Stacked Canvas to Scroll Horizontal Tabular Data Blocks In Oracle Forms
In this tutorial you will learn to create horizontal scrollable tabular or detail data block by usin ...
- Populating Tabular Data Block Manually Using Cursor in Oracle Forms
Suppose you want to populate a non-database data block with records manually in Oracle forms. This t ...
- Create Data Block Based On From Clause Query In Oracle Forms
Example is given below to create a data block based on From Clause query in Oracle Forms. The follow ...
- ORA-01578 ORACLE data block corrupted (file # 29, block # 2889087)
BW数据库后台报错如下:F:\oracle\SBP\saptrace\diag\rdbms\sbp\sbp\trace ORA-01578: ORACLE data block corrupted ( ...
- ORA-01578: ORACLE data block corrupted (file # 3, block # 1675)
警告日志中发现如下报错信息: ORA-01578: ORACLE data block corrupted (file # 3, block # 1675)ORA-01110: data file 3 ...
- Checking For User Permissions Before Updating or Inserting The Records in Oracle Forms
Suppose you want to check the user permissions on inserting or updating the records in Oracle Forms, ...
- Create Hierarchical Tree To Control Records In Oracle Forms
Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to co ...
- block传值以及利用block封装一个网络请求类
1.block在俩个UIViewController间传值 近期刚学了几招block 的高级使用方法,事实上就是利用block语法在俩个UIViewController之间传值,在这里分享给刚開始学习 ...
随机推荐
- Group Policy Object Editor
Group Policy Object Editor The Group Policy Object Editor is a tool that hosts MMC extension snap- ...
- Hyper-V 网络虚拟化技术细节
Hyper-V 网络虚拟化技术细节 适用对象:Windows Server 2012 R2 服务器虚拟化能让多个服务器实例在同一台物理主机上同步运行,但各个服务器实例都是相互独立的. 每台虚拟机的运作 ...
- linux下jenkins学习之简单安装
前提:安装包从官网获取https://pkg.jenkins.io/redhat-stable/jenkins-2.7.4-1.1.noarch.rpm 1.在线下载 Sudo -O wget htt ...
- Java类和对象 详解(一)---写的很好通俗易懂---https://blog.csdn.net/wei_zhi/article/details/52745268
https://blog.csdn.net/wei_zhi/article/details/52745268
- Python-S9——Day100-Web前端框架之Vue
01 课程简介: 02 let和const: 03 箭头函数: 04 对象的单体模式: 05 nodejs介绍和npm操作: 06 webpack.babel介绍和vue的第一个案例: 07 昨日内容 ...
- 网络流 24 题汇总(LOJ 上只有 22 题???)
太裸的我就不放代码了...(黑体字序号的题表示值得注意) 1.搭配飞行员 [LOJ#6000] 二分图最大匹配. 2.太空飞行计划 [LOJ#6001] 最小割常规套路.输出方案.(注:这题换行符要用 ...
- javasript 按值传递
现象总结如下: 1.JS的基本类型,是按值传递的.2.对于对象而言:分两种情况(a).如果传递给函数的参数是对象,并且修改了这个对象的属性(某些字段的值),那么奇妙的问题就来了.原参数就被修改了.(b ...
- char与byte的区别
很多初学者(包括我,已经学了一年多java了)肯会对char和byte这两种数据类型有所疑惑,相互混淆,今天特地查了好多资料,对byte和char两种数据类型进行了总结和比较,先将结果与大家分享: b ...
- mysql 排序字段与索引有关系吗?
mysql 排序字段与索引有关系吗?答案与否需要你explain一下你的sql脚本 另外记住:date_add()方法会影响Index_modify_time索引(即:时间字段索引) 一般遇到这样的 ...
- BZOJ【1606】购买干草
1606: [Usaco2008 Dec]Hay For Sale 购买干草 Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 859 Solved: 63 ...