问题现象:升级后可能会出现发货单(销售发票)调用订单不能保存,提示操作过程中发生资源共享冲突,可能单据号重复
问题分析:ufsystem数据库中表ua_iadentity中ifather,ichildid小于出错数据库中所对应的主表和
子表。用sql执行语句可解决:(ufdata_008_2010改为你所修改的帐套名)
发货单重复
use ufsystem
update ua_identity set ifatherid=(select max(dlid)from
ufdata_008_2010..dispatchlist),ichildid=(select max(idlsid)from
ufdata_008_2010..dispatchlists) where cacc_id='帐套号' and cvouchtype='DISPAT+CH'
销售发票重复
use ufsystem
update ua_identity set ifatherid=(select max(sbvid)from
ufdata_008_2010..salebillvouch),ichildid=(select max(autoid)from
ufdata_008_2010..salebillvouchs) where cacc_id='帐套号' and cvouchtype='billvouch'
(如果出错的是其他类型的单据,可以根据红色的字段,与下列ua_identity表中所对应的数据库表进行替换,下面的主子表代表出错的数据库中的表,不是ufsystem数据库中的。)
下表是UfSystem..Ua_identity 表中常用记录所对应的数据表及字段,
字段标识描述主表字段子表字段
Rd收发记录主子表Rdrecord.idRdrecords.autoid
BILLVOUCH销售发票主子表SaleBillVouch.SBVID SaleBillVouchs.autoid
DISPAT+CH发货退货单主子表DispatchList.dlidDispatchLists.idlsid
POMain采购订单主子表PO_Pomain.POIDPO_Podetails.id
SOMain销售订单主子表SO_SOMain.idSO_SODetails.autoid
PURBILL采购发票主子表PurBillVouch.PBVIDPurBillVouchs.ID
PURST+ID采购结算单主子表PurSettleVouch.PSVIDPurSettleVouchs.ID
SET+LEVOUCH委托代销结算单主子表SA_SettleVouch.IDSA_SettleVouchs.Autoid
Ju出入库调整单主子表JustInVouch.IDJustInVouch.Autoid
PUAPP采购请购单主子表PU_AppVouch.IDPU_AppVouchs.Autoid
PUARRIVAL采购到货单主子表PU_ArrivalVouch.IDPU_ArrivalVouchs.Autoid
T+r库存调拨单主子表TransVouch.IdTransVouchs.Autoid
EXPENSE代垫费用单主子表ExpenseVouch.IDExpenseVouchs.Autoid
Ch盘点单主子表CheckVouch.ID CheckVouchs.Autoid
Ma限额领料单主子表MatchVouch.IDMatchVouchs.Autoid
SALEPAY销售支出单主子表SalePayVouch.IDSalePayVouchs.Autoid
QUOMAIN销售报价单主子表SA_QuoMain.IDSA_QuoDetails.Autoid
XJ收付款单主子表(销售现结使用)Ap_CloseBill.ccancelnoAp_CloseBills.ID
SK收付款单主子表(收款cCancelNo is null)Ap_CloseBill.iIDAp_CloseBills.ID
OM_MO委外订单主子表OM_MOMain.MoidOM_MODetails.MODetailsID
OM_MS
委外结算主子表OM_MatSettleVouch.MSIDOM_MatSettleVouchs.MSDetailsID
OM_Materials委外用料表OM_MOMaterials.MOIDOM_MOMaterials.MOMaterialsID
问题2:新增或者修改自定义档案,在保存的时候提示:键列信息不足或不正确,更新影响到多行
错误原因:查userdef表
userdef表中多了个触发器,T6的数据结构中没有这个触发器,请在查询分析器中找到这个表,
(userdef,右键-所有任务-管理触发器-名称-下拉选择,触发器-删除-确定)
问题:按保存时提示说:操作过程中发生资源共享冲突(可能单据号重复),请稍后重试! 解决:最大单据号检测修复,更改发货单的最大单据号的语句 use ufsystem update ua_identity set ifatherid=(select max(dlid)from ufdata_111_2012..dispatchlist),ichildid=(select max(idlsid)from ufdata_111_2012..dispatchlists) where cacc_id='111' and cvouchtype='DISPATCH' 问题:按保存时提示说:单据保存失败,不能在具有唯一索引...的对象..中出入重复键的行。 解决:最大单据号检测修复,更改入库单的最大单据号的语句 Update UFSystem..UA_Identity Set iFatherId=(Select Max(ID) As ID From UFDATA_111_2012..RdRecord), iChildId=(Select Max(AutoID) As AutoID From UFDATA_111_2012..RdRecords) Where cAcc_Id='111' And cVouchType='rd'
应付应收单最大单据号 Update UFSystem..UA_Identity Set iFatherId=(Select Max(ID) As IID From UFDATA_111_2012..ap_closebill), iChildId=(Select Max(AutoID) As ID From UFDATA_111_2012..ap_closebills) Where cAcc_Id='111' And cVouchType='sk'
PS: as 代表重命名列名或表名 111为要修改的帐套名 ufdata_111_2012为要修改的帐套数据库