Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oracle Forms : Timers

1,899 views

Published on

Creating of timers in Oracle Forms

Published in: Software
  • Be the first to comment

  • Be the first to like this

Oracle Forms : Timers

  1. 1. Working With Timers http://blog.ebiztechnics.com
  2. 2. Objectives • Describe Timer • Usage of timer • Create timer • Modify timer • Handle timer expiration • Delete timer http://blog.ebiztechnics.com
  3. 3. Timers • What is a timer? A timer is an "internal time clock" that you programmatically create to perform an action each time the timer expires. • Built-ins used: – FIND_TIMER – CREATE_TIMER – SET_TIMER – DELETE_TIMER – GET_APPLICATION_PROPERTY (TIMER_NAME) http://blog.ebiztechnics.com
  4. 4. Usage of Timers • WHEN-TIMER-EXPIRED Trigger. • Using timers: – Periodically query, commit, or rollback – Show “About…” information at startup – Display ticker messages – Display running time http://blog.ebiztechnics.com
  5. 5. Handling Timer Expiration Start (R) T1 When-Timer-Expired (A) Query issued Timer T2 expired T2 Timer T1 expired (R) T2,T1 Completed When-Timer-Expired (T2) When-Timer-Expired (T1) Timer T1 created Timer T2 created Timer T1 expired http://blog.ebiztechnics.com
  6. 6. Creating a Timer • Syntax: • Example: CREATE_TIMER (timer_name, milliseconds, iterate) v_timer_id := CREATE_TIMER (‘Time1’, 300,repeat); http://blog.ebiztechnics.com
  7. 7. Modifying a Timer • Syntax: • Example: SET_TIMER (timer_name, milliseconds, iterate) SET_TIMER (timer_id, milliseconds, iterate) SET_TIMER (‘Time1’, no_change, no_repeat); http://blog.ebiztechnics.com
  8. 8. Delete Timer • Syntax: DELETE_TIMER (timer_name) DELETE_TIMER (timer_id) ... IF NOT ID_NULL (FIND_TIMER (‘Time1’)) THEN DELETE_TIMER (’Time1’); END IF; ... http://blog.ebiztechnics.com
  9. 9. Find Timer Expiration • Example: IF GET_APPLICATION_PROPERTY(TIMER_NAME)=‘Time1’ THEN Select . . . . . From t1; ELSE :control.time_disp:=:SYSTEM.CURRENT_DATETIME; END IF; http://blog.ebiztechnics.com
  10. 10. Summary • Create and modify a timer with built-in functions – FIND_TIMER – CREATE_TIMER – SET_TIMER – DELETE_TIMER – GET_APPLICATION_PROPERTY (TIMER_NAME) http://blog.ebiztechnics.com

×