Form_Success

Note:  

FORM_SUCCESS should not be used to test whether a COMMIT_FORM or POST built-in has succeeded.  

Because COMMIT_FORM may cause many other triggers to fire, when you evaluate FORM_SUCCESS it may not reflect the status of COMMIT_FORM but of some other, more recently executed built-in.  

A more accurate technique is to check that the SYSTEM.FORM_STATUS variable is set to 'QUERY' after the operation is done.

用form_success判断form是否没有错误,在某些时候是不能完全检测到form的错误。

比较正确的做法是对system.form_status是否是query进行判断。

 

IF Form_Success THEN

    Commit;

    IF :System.Form_Status <> 'QUERY' THEN

      Message('Error prevented Commit');

      RAISE Form_Trigger_Failure;

    END IF;

 END IF;

 

有时候看情况是否要增加SQLCODE的判断

IF form_success or SQLCODE = 0 THEN

posted @ 2011-11-29 09:16  郭振斌  阅读(1247)  评论(0编辑  收藏  举报