$PBExportHeader$f_rpt_dberror.srf $PBExportComments$数据窗口错误信息--函数 global type f_rpt_dberror from function_object end type forward prototypes global subroutine f_rpt_dberror (integer errcode, string errtext) end prototypes global subroutine f_rpt_dberror (integer errcode, string errtext);String ls_err CHOOSE CASE errcode CASE -3 ls_err='其他操作员已修改,请重新操作!' CASE 242,296,298 ls_err='日期无效!' CASE 515 ls_err='在不允许空值的字段试图插入空值!' CASE 2627 ls_err='主关键字重复!' CASE ELSE CHOOSE CASE Mid(errtext,12,5) CASE '22003' ls_err='数值超出范围!' CASE '22008' ls_err='日期无效!' CASE ELSE ls_err='出错代码'+String(errcode)+':~n~n'+errtext END CHOOSE END CHOOSE if ls_err>'' then messagebox('出错信息',ls_err,stopsign!) end subroutine