قال حبيبنا ونبينا سيدنا محمـد صلَّ اللهُ عليه وسلَّم : "ما من مسلِمٍ يغرسُ غرسًا أو يزرعُ زرعًا فيأْكُلُ منْهُ طيرٌ أو إنسانٌ أو بَهيمةٌ إلَّا كانَ لَهُ بِهِ صدقةٌ" . المصدر : صحيح البخاري
Wednesday, August 12, 2015
A Simple Oracle Query Form
In the name of Allah,
Most Gracious, Most Merciful
Praise be to Allah,
blessing and peace be upon our prophet Mohammed, his family and his companions.
step in applying for a new Oracle Developer is not an easy step. Since applying
for this job needs you not only to be familiar with the whole track courses, but
technically it needs you to be familiar with what makes the work goes forward.
Today, I am going to explain you one of the most common
tasks that you should be acquainted with before applying for a new job.
should never miss the query form enhancements i added at the end of this article. It simply facilitates the user input in re-query different criteria.
Create A Simple Query Form Manually.
Task Solution idea:
we all had learned from Oracle documentations, tutorials, or even at educational
centers from the very beginning steps how to query data from the database into an
Oracle form as follows:
·In Web-based forms the user press CTRL+F11 function key to retrieve
all data from the database.
·Or press the F11 function key to filter data in Enter Query mode.
Then, Press the CTRL+F11 function key to execute the query.
But today we will learn how to customize a query
form in more useful and practical way. The idea of the task solution is based
·Create one master control block with ' Lov' for a search criteria
control block is a block that is not associated with any database table. Items
in a control block do not, by default, relate to any database columns.
·Create a muti-record detail database block.
·Create a relation between the two previous blocks.
1.Create a master control
block (database= yes)to accept retrieving
data from the detail block. Hence, no data source specified in control block
2.Create two List of
Value ' Lov' for two non database item e.g.
Semester_Year and Class_Id; these two
text item will copy the value entered or selected from ' Lov' to the detail block.
3. Create a detail data block:
must select both Semester_Year and Class_Id with other related table items.
is also recommended to make both Semester_Year and Class_Id for the detail
4.Create a relationship
between the two blocks with having e.g. Semester_Year and Class_Id (will do the
job of Copy Value from Item property) for filtration of data.
5.Create a PRE-QUERY
trigger in the detail data block :
The following code will help to pro-grammatically filter the
retrieved data from the related database.
WHEN-NEW-BLOCK-INSTANCE trigger in the detail data block
Query Form Enhancement
Now it's time to add some
enhancement to your form to avoid an expected issue you will face on
re-querying other search criteria...
When a set of record displayed in the
detail block, the user will definitely need to choose another value once again from
LOV existed in Master block. Consequently, the relationship between the control
block and the detail block will not work since copy value from item will not
change and the old set of records will keep appearing in the detail block.
At Header Block create
WHEN-NEW-BLOCK-INSTANCE Trigger and paste the following sequential
All you have to do is to rename
the form blocks upon yours.
Remember, criticizing your failure and work by all the
means to pass through the barriers is a self building esteem to your career path.
The profound desire to solve problems and learn new development techniques is
really a good sign of an experienced developer you will find later in yourself.