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之间传值,在这里分享给刚開始学习 ...
随机推荐
- 【Decode Ways】cpp
题目: A message containing letters from A-Z is being encoded to numbers using the following mapping: ' ...
- leetcode 【 Subsets 】python 实现
题目: Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset mus ...
- MongoDB快速入门学习笔记7 MongoDB的用户管理操作
1.修改启动MongoDB时要求用户验证加参数 --auth 即可.现在我们把MongoDB服务删除,再重新添加服务 mongod --dbpath "D:\work\MongoDB\dat ...
- android adb常用指令
介绍一个更详细的介绍ADB的: https://github.com/mzlogin/awesome-adb/blob/master/README.md ----------------------- ...
- python深浅拷贝以及数据在内存中储存方法
要搞懂深浅拷贝,首先要明白数据在内存里的储存方法. 一个变量的储存,首先是变量名加上储存内容的ID,通过ID去找到变量名所对应的内容, 当我们对数据进行赋值时,其实是把内容的整体地址赋给别的变量名(相 ...
- 13 Java内存模型
数据竞争 int a=0, b=0; public void method1() { int r2 = a; b = 1; } public void method2() { int r1 = b; ...
- 转载 hadoop 伪分布安装
一. 概要 经过几天的调试,终于在Linux Cent OS 5.5下成功搭建Hadoop测试环境.本次测试在一台服务器上进行伪分布式搭建.Hadoop 伪分布式模式是在单机上模拟 Ha ...
- hdu 4176
Class Statistics Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...
- Mysql 死锁
http://www.cnblogs.com/benshan/archive/2013/05/09/3068886.html 声明:以下讨论只是针对InnoDB存储引擎. 何为死锁? 死锁是对资源 ...
- 【WC2019笔记】IOI2018 / ACM题目选讲
哇!济南的 rqy 大佬讲课!就是 $luogu$ 上有名的那位! 上面这句话写错了,请大家无视 XylophoneIOI2018 练习赛 T2题意:交互提有一个 $0\sim n-1$ 的排列,保证 ...
