违反了 PRIMARY KEY 约束 'PK_GL_BALANCE_119605'。不能在对象 'dbo.T_GL_BALANCE_119605' 中插入重复键。
语句已终止。
发生时间: 2016-02-05 03:10:50
错误编号: BOS_ExecuteNonQuery
错误信息: 违反了 PRIMARY KEY 约束 'PK_GL_BALANCE_119605'。不能在对象 'dbo.T_GL_BALANCE_119605' 中插入重复键。
语句已终止。
Sql语句: IF EXISTS (SELECT 1 FROM T_GL_BALANCE_119605 WHERE (FACCOUNTID = 123156 AND FDETAILID = 0))
BEGIN
INSERT INTO T_GL_BALANCE_119605 (FACCOUNTBOOKID, FYEAR, FPERIOD, FACCOUNTID, FDETAILID, FCURRENCYID, FBEGINBALANCEFOR, FBEGINBALANCE, FDEBITFOR, FDEBIT, FCREDITFOR, FCREDIT, FYTDDEBITFOR, FYTDDEBIT, FYTDCREDITFOR, FYTDCREDIT, FENDBALANCEFOR, FENDBALANCE, FADJUSTPERIOD) SELECT FACCOUNTBOOKID, FYEAR, FPERIOD, FACCOUNTID, 1 fdetailid, FCURRENCYID, FBEGINBALANCEFOR, FBEGINBALANCE, FDEBITFOR, FDEBIT, FCREDITFOR, FCREDIT, FYTDDEBITFOR, FYTDDEBIT, FYTDCREDITFOR, FYTDCREDIT, FENDBALANCEFOR, FENDBALANCE, FADJUSTPERIOD FROM T_GL_BALANCE_119605 WHERE (FACCOUNTID = 123156 AND FDETAILID = 0)
END
===================================================
调用堆栈:
Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteBatch(Context ctx, List`1 lstSqlObj)
在 Kingdee.K3.BD.App.Common.ServicePlugIn.Account.Save.UpdateAcctFlexItemData(DynamicObject[] dyObjs)
在 Kingdee.K3.BD.App.Common.ServicePlugIn.Account.Save.EndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.PlugInProxy.OperationServicePlugInProxy.FireEndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
在 Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
在 Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(Context ctx, BusinessInfo businessInfo, DynamicObject dataObject, OperateOption option, String operationNumber)
在 Kingdee.BOS.Model.Bill.BillModel.Save(OperateOption option)
在 Kingdee.BOS.Business.Bill.Operation.Save.ExecuteBillOperation(OperateOption option)
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)
推荐阅读