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之间传值,在这里分享给刚開始学习 ...
随机推荐
- python实现算法: 多边形游戏 数塔问题 0-1背包问题 快速排序
去年的算法课挂了,本学期要重考,最近要在这方面下点功夫啦! 1.多边形游戏-动态规划 问题描述: 多边形游戏是一个单人玩的游戏,开始时有一个由n个顶点构成的多边形.每个顶点被赋予一个整数值, 每条边被 ...
- js验证密码强弱
JS密码强度验证 <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML ...
- Unity 脚本<1>
RaycastHit2D hit = Physics2D.Linecast(targetPosition, targetPosition + new Vector2(x, y)); 猜测是lineca ...
- [tsinsen_A1278]串珠子
[tsinsen_A1278]串珠子 试题描述 铭铭有 \(n\) 个十分漂亮的珠子和若干根颜色不同的绳子.现在铭铭想用绳子把所有的珠子连接成一个整体. 现在已知所有珠子互不相同,用整数 \(1\) ...
- [luoguP2596] [ZJOI2006]书架(splay)
传送门 题目中的几个操作,直接splay搞一下即可: 把s旋转到根,左子树接到右子树 把s旋转到根,右子树接到左子树 交换s相邻的信息即可 把s旋转到根,左子树的大小即为答案 找第k大 没了 #inc ...
- php中session的生成机制、回收机制和存储机制探究
1.php中session的生成机制 我们先来分析一下PHP中是怎么生成一个session的.设计出session的目的是保持每一个用户的各种状态来弥补HTTP协议的不足(无状态).我们现在有一个疑问 ...
- python没学好
环境 装东西用pip3不是pip 运算 //是下取整 py的浮点数也没有大小限制,但是超出一定范围就直接表示为inf 条件语句与循环 if xxx:, elif:, else:, 'for x in ...
- Crash的数字表格(bzoj 2054)
Description 今天的数学课上,Crash小朋友学习了最小公倍数(Least Common Multiple).对于两个正整数a和b,LCM(a, b)表示能同时被a和b整除的最小正整数.例如 ...
- BZOJ 3897: Power
3897: Power Time Limit: 30 Sec Memory Limit: 512 MBSubmit: 218 Solved: 83[Submit][Status][Discuss] ...
- 【BZOJ1030】文本生成器(容斥原理,AC自动机,计数DP)
题意:给出n个字符串,求长为m至少包含n个里其中一个的串的字符串一共有多少个,字符集为A到Z,答案对10007取模 n<=60,len<=100 思路:将至少一个转化为所有个数减去没有出现 ...
