Sunday, November 12, 2017


Oracle Forms 10G Configuration
 On 11g Database &Windows 8.1


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. After that,


     Despite the new Oracle technologies, i noticed that Oracle  forms 10G still the favorite version  for a large sector of companies around the Arabic and far east World. Besides the CS students are still looking forward to install and  learn as a training.


Oracle  forms 10G is NOT compatible with Microsoft Windows 8.1 Operating System.   So we had made some workarounds. Once it is successfully installed then, it is time to configure. The next step you should look forward is configuring Oracle Forms…

Why do we need to configure Oracle Forms 10G ?

 The answer is simple; we configure it to run it successfully on the browser.

Task Definition:   

Configure Oracle forms 10G 

 The significant importance of configuring Oracle Forms guarantees a successful running on browser. 
Let's try to run Oracle forms without configuration you will face the following forms errors…

Open Oracle form builder and press run button

Oracle Forms asks you the following question



Press yes and input your connection strings
You will step into a sequenced error messages you have to solve as follow: 

Task Problem no.1

 The first configuration problem is the connection between Oracle database and   Oracle forms is missing so Oracle forms generates the following error message 
 Ora-12154 tns could not resolve service name.




Task Solution no.1:

 between If this is your first time you are trying to establish a database connection   forms then you have two possible solutionsOracle Data base 11G and Oracle 


     1.copy the content of the tnsnames.ora file located on the Oracle database path                        <oracle_home>/network/admin/tnsnames.ora       
         into the tnsnames.ora file located on Oracle Developer Suite path    
        DevSuiteHome_1 /network/admin/tnsnames.ora

      2. you can do it manually create a new entry in the following path
         C:\DevSuiteHome_1/NETWORK/ADMIN/ tnsnames.ora file.

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = AMATU_ALLAH)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )

If  this is NOT your first time you are trying to establish a database connection between Oracle database 11G and Oracle forms then you have to start the service over and over until it is successfully started.

Press the Run button once again you will get the following error


Task Problem no.2
.
 

Task Solution no.2 

Create a new canvas with any data block or even a simple text or button for testing purposes.
Press the Run button once again you will get the following error


Task Problem no.3


Task Solution no.3 

Set in Edit-->preferences-runtime - reset default browser

 










The port number must match that found in your portlist.ini file as follow.


You have to specify the browser location where Oracle form display its contents.


Once again try press Oracle Forms Run button, you will face the next error message: 

Task Problem no.4





Task Solution no.4:

     You must run the OC4J (Oracle Containers for Java/ J2EE) provides an execution environment for J2EE applications.
     Windows users have to use the scripts located in the  DevSuiteHome\j2ee\DevSuite directory:

     o    startinst.bat
     o    stopinst.bat

 All our concern in this point is to learn how to start and stop Oracle Developer Suite OC4J instances for Oracle Forms for testing purpose and to create a desktop short-cut for its frequent need as long as you need to run Oracle forms builder.
Please follow the steps:

·         Create a Start Oc4j Short Cut file on desk top.

The Oc4j  start up file is located at the following path:

       C:\DevSuiteHome_1\j2ee\DevSuite\startinst.bat














·         Create a Stop  Oc4j Short Cut file on desk top.

The Oc4j  start up file is located at the following path:

               
                     C:\DevSuiteHome_1\j2ee\DevSuite\stopinst.bat

A screen shoot  showing the Oc4j  start up and the Oc4j  stop short cuts.






































A screen shoot showing the first Oc4j initialization. 
   

A screen shoot showing the usual startup screen of OC4J after the initial run.



Learn more about:



Hope this helps...

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.




Thursday, June 8, 2017

Data Validation


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. After that,


         A successful applications, mainly rely on data validation strategies.     
 It involves understanding  the user business requirements, increase the usability and reliability of  your application and effectively test its data validation to reduce the long-term cost of your software application. On the other hand, this result in reducing the cost of validation for each subsequent release of your application.


Task Definition:   

Enforce validation of  one form to equal the summation of other form items. e.g. item1 =  item2 +  item3 +  item4 
Then, prevent the user from saving the data if the condition violated


Task Solution:

To enforce validation of  one form to equal the summation of other form items  if the condition violated you  have to:

 Create WHEN-VALIDATE-RECORD Trigger (block level)



DECLARE


         tot NUMBER  :=0 ;

BEGIN
     
     tot := NVL(:item2,0) + NVL(:item3,0) + NVL(:item4,0) ; 

IF tot  <> :item1 THEN

     -- Create a message or Alert here 

MESSAGE('Please Check Related Quantities to FormItem1');
PAUSE

END IF;

END;



To Prevent the application user from saving the form  if the condition violated you have to:

Create PRE-INSERT or PRE-COMMIT Trigger ( form level)

 
DECLARE


     tot NUMBER  :=0 ;

BEGIN

    tot := NVL(:item2,0) + NVL(:item3,0) + NVL(:item4,0) ;

IF tot  <> :item1 THEN

     -- Create a message or Alert here 


MESSAGE('Please Check Related Quantities to FormItem1');
PAUSE;

-- To prevent a user fro saving the violated condition use...

     RAISE FORM_TRIGGER_FAILURE;

END IF;

END;



Learn more about:

           Oracle Report With No Data
·          Oracle Forms Data Exchange
·           


Hope this helps...

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.