Email Us : sunilkumark11@gmail.com
Free Training > SQL PL / SQL Forms Reports Oracle Applications
< Previous Next >

 
Forms - Creating Database block Manually

The following example helps to learn creating data block manually.

Example
Create dept table in your database.

SQL>  CREATE TABLE DEPT (DEPTNO NUMBER(2),
DNAME VARCHAR2(14),
LOC VARCHAR2(13) );

 

Insert four rows into the table.

SQL> INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK');
SQL> INSERT INTO DEPT VALUES (20, 'RESEARCH', 'DALLAS');
SQL> INSERT INTO DEPT VALUES (30, 'SALES', 'CHICAGO');
SQL> INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON');
SQL> commit;

SQL> Select * from dept;

Open the form builder tool
You will get welcome to Form builder Select build new form manually Ok
You will be directed to object navigator.

Select data blocks click on create button.

 

 

 Build new data block manually Ok  ( Empty block is created ).
Create canvas
Select Canvases Click on create button ( Canvas is created ).
Go to Layout Editor ( Tools Layout Editor )

Place three text item on the layout.
For each text item, provide the following properties

Properties

1st text item

2nd text item

3rd text item

Name

DEPTNO

DNAME

LOC

Datatype

Number

Char

Char

Column Name

deptno

dname

loc

Prompt

Deptno

Dname

Loc

In object Navigator select the block, provide the following properties

Name

DEPT

Query data source name

Dept

Query data source column

column name

datatype

length

DEPTNO

NUMBER

2

DNAME

VARCHAR2

14

LOC

LOC

13

File Save
Program Compile Module
Program Run form

Click on execute query

 


< Previous Next >