iSelfSchooling.com - Copyright © 1999-2007 iSelfSchooling.com  References  Job Openings  |  Secure Login
    Home  | Search more...  |  FREE Online VIDEO Oracle Training  |  Gift Store  |  Bookstore

   Unlimited access!   

    Oracle  Syntax  | Suggestions Your Contribution  |  FREE Legal Forms

 

Email2aFriend Homepage us! |  Bookmark   -  Copyright & User Agreement

Products/Services

 Vision/Mission

 Community Sharing

 Services

  Products

 Biography

 Contact Us

 FAQ

 Current News

 Website Traffic

 Bookstore

 FREE Training

 SQL

 PL/SQL

 Forms 

 Reports

 Other TOOLS

 Fundamentals

 Performance

 OEM

 Application Server

 Grid Control

 Articles

 Prepare for OCP

Oracle SYNTAX

 Oracle Functions

 Oracle Syntax

 Oracle 10g Syntax

  PL/SQL Syntax

UNIX and more...

 UNIX for DBAs

 LINUX for DBAs

 DB using PHP

  A+ Certification

 Basics of JAVA  

 Tips of  SEO

Finance/Jobs

 Financial Aid

 Skilled

 Oracle

 Jobs

  Magazine

More Training

 Q & Answers

 SQL-PL/SQL

 DBA

 Developer

 Important Notes

 Case Studies

 9i New Features

 10g New Features

 10g Qs/As

 Grid Control

 OracleAS # I

 OracleAS # II

  LDAP and OID

  HTTP Server

 Instructor-Led

  Virtual Hosts

 Community Sharing

More to know...

Acknowledgement**

 FREE Legal Forms

 Who is who

 Market Place

 University Directory

 Advisory Articles

 Links...

 

 

Topics:  Hands-On 12: Global variable, trigger (when-new-form-instance)

Now, your client notice it would be better for them if they could get to specific product's price rather than entire table.  They want you to add more functionality to their application to display only current item information.

The current product would be defined by the position of your cursor.

You have been assigned to modify your application to query only pricing information for a product whenever your current cursor position is.

You will learn how to:  use and assign global variable, pass global variable from one form to another, use global variable to execute query base on that parameter, create and use "WHEN-NEW-FORM-INSTANCE" trigger.

 

More Resources by Google:

Manuscript

Save the “Customer orders” Form name as version 12.

 

Save the “Product Price Data Entry” Form name as version 2.

 

Change the application to query all the product prices for an item that the cursor is on.

 

Expand the “Product Price Data Entry” Form.

Select “Data Blocks.”

Create a new data block manually.

Change its name.

Open it's property palette.

Change "Database Data Block" to "NO."

Close the window.

 

Create a new item.

Open it's property palette.

Change the "name" item to “TEMP_VALUE.”

Change its datatype.

Change "database item" to “NO.”

Close the window.

 

Select “Prodid” on the price data block; and open its property palette.

For “Copy Value From Item” type "control_block.temp_value."

Close the window.

This shows where the “temp_value” item is coming from.

 

Create a "WHEN-NEW-FORM-INSTANCE" trigger at Form level.

Type “W” and “N” and select the trigger.

Move the global prodid item value into the temp_value item.

Then go to the “price” data block and execute the query function.

Compile the trigger and close the window.

 

Highlight the Form and save it. Then compile it.

 

On the other Form, right click on “push button” to choose “Smart Trigger” and select the "WHEN-BUTTON-PRESSED" trigger.

 

Change the program name to the new version (version 2).

Move the product id item value into the global product id item.

Compile the trigger and then close the window.

 

Run the application.

Click on “Execute  Query.”

Navigate through the application.

 

Highlight a product id and then click on the “Product Price Data Entry” push button.

Now, you only see information about that specific product id not all the products.

 

Repeat the process for some other items.

 

Minimize the "Product Price Data Entry" window.

Navigate through some other application's functions.

 

Then, close all the windows and save the changes.

 

Now, you should practice this over and over, until you become a master at it.

Good Luck.

 

 
 
Google
 
Web web site