插入错误:列名或所提供值的数目与表定义不匹配

问题现象:今天在一个U852版本中新建2009年度账过程中,进行到:正在传输网上银行信息NBNEWACC.DLL时提示“插入错误:列名或所提供值的数目与表定义不匹配”,一套账是正确的可以建立年度账,另5套账均不行。

问题分析:软件本身存在问题,安装补丁并更新后应该可以,但处理时却不行,对比正常与不正常数据之间的两个网上银行的表NB_Account与NB_PayAccountInfo发现不正常的账套缺少字段

解决方法:方法1
执行以下脚本即可:
use ufdata_xxx_xxxx  --(xxx_xxxx换成对应的账套与年度)
alter table  NB_Account drop column  cOrganId
alter table  NB_Account drop column  cBranchId
alter table  NB_Account drop column  iSignFlag
alter table  NB_PayAccountInfo drop column  cAccName
alter table  NB_PayAccountInfo drop column  cCBBDepId
alter table  NB_PayAccountInfo drop column  cBranchId
alter table  NB_payment drop column  cPackageId
alter table  NB_payment drop column  iBillStatus
方法2
因客户没有使用网上银行模块,可以直接打开企业管理器,删除2008年的关于网上银行的表(NB开头的所有表),拷贝999或其他账套的NB开头的所有表到2008年即可。

原文地址:https://www.cnblogs.com/martian6125/p/9631334.html