开发者

problem with timer in oracle form

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 fo开发者_运维百科rm 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;


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜