problem with timer in oracle form

前提是你 提交于 2019-12-12 01:51:35

问题


I am working on an application that created by oracle forms(6i). I try to use timer in one of my forms every thing was fine during testing and I move my form to production. when I move to production when I open my form, I try to access to another form when my form was opened I faced with problem. unfortunately, I don't know why my menu not working correctly, I mean my menu open another form when this form is running.

there isn't any relation between menu and that form, kindly please advise me about it. also in those systems with old specification rendering of application face with problem. I mean I have a main form with menu that contain a background picture, system flashing for rendering that background.

I create my table according to this post and it is working fine

Updating board in oracle form

I changed timer length from 300 until 1000 no effect :(

I am working with Oracle forms 6i, but I can convert to 10g also. My oracle server version is 9.

my timer:

Triger WHEN-NEW-FORM-INSTANCE

DECLARE
    timer_id timer;

BEGIN   
    timer_id := CREATE_TIMER('TIMER1',1000,REPEAT);
END; 

Trigger WHEN-TIMER-EXPIRED

declare 
    timer_id timer;
    nv_temp varchar2(400);
    nv_temp_ch varchar2(2);
begin
    IF length(:NB_VTB.NB_STATUS) > 4 THEN
        nv_temp := substr(:NB_VTB.NB_STATUS,2,length(:NB_VTB.NB_STATUS));

        IF(:parameter.TP_STR_LEN = 0 )THEN
                nv_temp := nv_temp ||'    ('||to_char(SYSDATE,'hh:mm:ss')||')   ';          
        END IF;
        nv_temp_ch := substr(:NB_VTB.NB_STATUS,1,1);

        if (nv_temp_ch = ' ') then
            nv_temp_ch := '`';
        else
            nv_temp := replace(nv_temp,'`',' ');    
        end if;

         nv_temp := nv_temp || nv_temp_ch;  

        :NB_VTB.NB_STATUS := nv_temp;
        :parameter.TP_STR_LEN := :parameter.TP_STR_LEN + 1;

        IF :parameter.TP_STR_LEN > length(:NB_VTB.NB_STATUS)THEN
            :parameter.TP_STR_LEN := 0;
            :NB_VTB.NB_STATUS := FPG_FORM_STARTUP.ffn_get_status;
        END IF;
    END IF;
end;

回答1:


try this, it should work.

    PROCEDURE Delete_Timer IS
         tm_id  TIMER;
    BEGIN
      tm_id:=Find_Timer('TIMER1');
      IF NOT Id_Null(tm_id) THEN
        Delete_Timer(tm_id);
      ELSE
        Message('Timer '||' has already been cancelled.');
      END IF;
    END;


来源:https://stackoverflow.com/questions/6517499/problem-with-timer-in-oracle-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!