现在的位置: 首页 > 综合 > 正文

Form_Success

2013年02月10日 ⁄ 综合 ⁄ 共 638字 ⁄ 字号 评论关闭

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

抱歉!评论已关闭.