用Forms編寫的數字時鐘

 

兩個塊之間觸發

 

form 級的when-new-forms-instance 代碼爲:
  
  declare 
  timer_id timer;
  begin
  timer_id:= create_timer('T1',1000,REPEAT);
  -- T1 應大寫,是時鐘的名稱,1000表示1秒
  :current_time := sysdate;
  end;  
  
  form 級的 when-timer-eXPired 代碼爲:
  
  declare
  TimerName varchar2(20);
  begin
  TimerName :=get_application_PRoperty(TIMER_NAME);
  if TimerName='T1' then 
    :current_time := sysdate;
  end if;
  end;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章