Modes of Operation in Oracle Forms and Retrieving Data

Oracle Forms Developer has two types of modes of operation , one is Enter-Query mode and other is Normal mode. We use Enter-Query mode to enter search criteria for a database query and use normal mode to insert and alter records in the database.

We can do retrieve all records, retrieve records by using selection criteria, retrieve records by using the Query/Where dialog box through Enter-Query mode. In the case Normal mode, we can do retrieve all records, insert new record, update or delete record, commit and roll back records by using Normal mode.
We can retrieve data through two types of queries:

  • Unrestricted
  • Restricted

Example of Unrestricted Query through Oracle Forms Builder:
==============================================

1/ First of all, we need to run Forms Builder application and start OC4J instance.

2/ Click on the plug icon from menu bar to connect with database by providing with username, password and database name.

3/ After connecting with database, click on the module from object navigator then click on the green icon plus to create new module.

4/ Right Click on the Data Blocks from new creat module then select data block wizard. We can select data block wizard from different position.

–> Click on the Tools from menu bar then Select Data Block Wizard.

–> Click on Data Block Wizard button from the toolbar.

5/Create a CANVASE,FRAMES and Items from table by using Data Block Wizard.

6/ Click on the Run Form or Run Form Debug icon from display toolbar.

7/ After clicking, we will see a table window through browser that we have created by using data block wizard.

8/ Click on the Query menu from Default menu then select Execute from drop down menu.

9/ If we click next and previous button from menu toolbar then we will see data is changing. So We can easily Unrestricted Query by using this process.

 

Example of Restricted Query:
======================

1/ Above step from 1 to 7 will be same for restricted query.

2/ For exact match, Click on the Query menu from Default menu then select Enter from drop down menu or click on the Enter Query button from menu toolbar.

3/ Put appropriate value in the table field. Like employee id 100 then Click on the Query menu –> click on the Execute or directly click on the Execute Query button from menu toolbar.

4/ After clicking, we will see details of 100 employee id.

5/ Using LIKE operator, Click on the Query menu from Default menu then select Enter from drop down menu or click on the Enter Query button from menu toolbar.

6/ Put value with LIKE operator (%, _) in the table field. Example, employee id %04 or _04 then click on the Execute Query button from menu toolbar.

7/ After clicking, this query will show only last number 04 related data. Like 104 employee id, 204 employee id.

So, we can run query by modes of operation and easily retrieve data by using restricted and unrestricted query through Oracle Forms Builder.