可以在这之前加一句 if csny="" or isnull(csny) then csny=0如果值不能为零.根据你的数据库类型改. if isnull(csny) then csny=""
提前判断csny不为空,或者设置csny字段可为空
可能数据库中csny字段 设置了不能为空