Friday, April 12, 2013

Chapter No.10 How to save the data in database in Oracle?

In this chapter we will store the data in oracle database.

In Chapter No.6 we have designed a form by using oracle forms builder with wizard.  We will store a data of these fields in database now. As we know that we are already created tables in database in Chapter No. 2.
  1. Open a form in oracle forms builder that we have designed in Chapter No.6 and connect it with database.
  2. Drag a button on canvas.
  3. Click on button and press F4 go to the property of this button and set its label i.e “Save”.
  4. Now we will put a trigger on this button that is “WHEN-BUTTON-PRESSED” trigger.
  5. In order to put this trigger on button just right click on this button and select “Smart Triggers” then select “WHEN-BUTTON-PRESSED” trigger.
  6. Put this code in SQL/PLSQL portion of the trigger.
BEGIN

COMMIT_FORM;

END;
 
7. After this code just run this form with shortcut key (CTRL+R).
8. Now your form is ready for use without any error just put the data in these fields and press this button “Save”

No comments:

Post a Comment

Thank You For Comment