GO_BLOCK in WHEN_VALIDATE Trigger
来源:互联网 发布:连锁超市软件 编辑:程序博客网 时间:2024/05/16 01:27
I'm working with oracle forms. I've a procedure I have to run whenever a specific field's value is modified. The procedure I have to execute contains a go_block instruction, which can't be used in the when_validate_item trigger. Is there anyway to bypass this?
EDIT
I have to use the when_validate_item, because the procedure I have to run has to be run when the field is modified, BUT BEFORE the validation is executed.
3 Answers 3
Usually there is a restriction on using GO_BLOCK
or GO_ITEM
on aWHEN-VALIDATE-ITEM
. However there are a couple of ways to overcome this. One way is to use aWHEN-TIMER-EXPIRED
trigger. Here is how-
WHEN-TIMER-EXPIRED
Begin if GET_APPLICATION_PROPERTY(TIMER_NAME) = 'NEW_TIMER' then CALL_PROG_UNIT(); --This is your Procedure that calls the GO_BLOCK /*Do rest of validation here*/end if;END;
WHEN-VALIDATE-ITEM
DECLARE timer_id TIMER; Begin timer_id := CREATE_TIMER('NEW_TIMER',1,NO_REPEAT); --set a short timer so that the WHEN-TIMER-EXPIRED trigger is fired immediatelyEnd;
What happens is - This will create & expire the timer as soon as the CREATE_TIMER
function is called and then the form level triggerWHEN-TIMER-EXPIRED
will check the expired timer name and call your program unit that has theGO_BLOCK
. Hope this helps.
http://stackoverflow.com/questions/12608330/go-block-in-when-validate-trigger
- GO_BLOCK in WHEN_VALIDATE Trigger
- Trigger in oracle
- Trigger Execution Sequence in Forms 4.5
- ORA-04092: cannot COMMIT in a trigger
- 05 trigger the checkbox column in datagridview
- how to trigger event in program
- Trigger Execution Sequence in Oracle Forms
- (V45) Trigger Execution Sequence in Forms 4.5
- postman trigger xdebug session in phpstorm
- Trigger
- TRIGGER
- TRIGGER
- TRIGGER
- trigger
- trigger
- trigger
- trigger
- Trigger
- 碰撞检测
- 使用C语言进行面向对象的开发--GObject入门[5]
- 无间断大图滚动
- HTML5基础之HTML-表单
- Retrofit框架学习(二)
- GO_BLOCK in WHEN_VALIDATE Trigger
- Technocup 2017 - Elimination Round 1
- Python继承中的元类
- ubuntu15.04怎么把英文界面设置成中文
- tweenjs大图滚动
- 使用C语言进行面向对象的开发--GObject入门[6]
- Linux中的文件描述符与打开文件之间的关系
- python中while循环的注意事项。
- 鼠标移入移出事件