f_rpt_dberror.srf 869 B

1234567891011121314151617181920212223242526272829303132
  1. $PBExportHeader$f_rpt_dberror.srf
  2. $PBExportComments$数据窗口错误信息--函数
  3. global type f_rpt_dberror from function_object
  4. end type
  5. forward prototypes
  6. global subroutine f_rpt_dberror (integer errcode, string errtext)
  7. end prototypes
  8. global subroutine f_rpt_dberror (integer errcode, string errtext);String ls_err
  9. CHOOSE CASE errcode
  10. CASE -3
  11. ls_err='其他操作员已修改,请重新操作!'
  12. CASE 242,296,298
  13. ls_err='日期无效!'
  14. CASE 515
  15. ls_err='在不允许空值的字段试图插入空值!'
  16. CASE 2627
  17. ls_err='主关键字重复!'
  18. CASE ELSE
  19. CHOOSE CASE Mid(errtext,12,5)
  20. CASE '22003'
  21. ls_err='数值超出范围!'
  22. CASE '22008'
  23. ls_err='日期无效!'
  24. CASE ELSE
  25. ls_err='出错代码'+String(errcode)+':~n~n'+errtext
  26. END CHOOSE
  27. END CHOOSE
  28. if ls_err>'' then messagebox('出错信息',ls_err,stopsign!)
  29. end subroutine