Form_Success 判断form有没有错误

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值