当前位置:首页 > 用友T3用友通 > 正文内容

用友T3记账时报错,运行时错误‘-2147217873,怎么办?

8年前用友T3用友通5236

用友T3财务软件在记账的时候提示错误:运行时错误‘-2147217873(80040e2f)':违反了PRIMMARY KEY 约束‘GL-mpostcond1_pk"不能在对象‘GL-Mpostcond1中键入重复键。如下图所示:

运行时错误‘-2147217873(80040e2f)':违反了PRIMMARY KEY 约束‘GL-mpostcond1_pk"不能在对象‘GL-Mpostcond1中键入重复键错误提示图片

也有不少的财务会计朋友是在使用用友通T3软件的返记账过程中提示的。那么怎么解决这个问题呢?

微信号:yyrjlls
扫码 有偿解决 用友软件技术问题!
复制微信号

经过用友财务软件小编跟踪数据库发现主要是软件考虑的不够周全,后来用友畅捷通用友T310.8plus1标准版及后续版本使用补丁做了改进了,所以解决这个问题要看版本。

如果是用友T310.8plus1之前的版本,请先在查询分析器中执行如下脚本:

use ufdata_xxx_2014

delete from gl_mpostcond1

然后再执行如下脚本,避免后续出现类似的问题。

SET QUOTED_IDENTIFIER OFF      
GO      
SET ANSI_NULLS ON      
GO      
ALTER Proc [dbo].[GL_P_JZA](@iPer tinyint = 11, @ccash tinyint =1, @tcond varchar(5000)= '') AS SET NOCOUNT On declare @ss varchar(8000)      
declare @Checkflag varchar(20) declare @trnd bigint set @trnd=(select convert(bigint,rand()*100000000000)) declare @temptable varchar(50) declare @temptable2 varchar(50) set @temptable='GL_jztmp'+ convert(varchar(30),@trnd) set @temptable2='gl_bookB'+ convert(varchar(30),@trnd) set @Checkflag = (SELECT cvalue FROM AccInformation WHERE cSysID='GL' AND cName='bNotCheckJz')      
Delete From GL_mpostcond1 if @ccash=0 begin      
if @Checkflag = 'False' set @ss='SELECT iperiod,isignseq,ino_id From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (not (ccheck is null) and iflag is null or ccheck is null and iflag=1) GROUP BY iperiod,isignseq,ino_id' else set @ss='SELECT iperiod,isignseq,ino_id From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (iflag is null or ccheck is null and iflag=1) GROUP BY iperiod,isignseq,ino_id'      
Insert GL_mpostcond1 exec (@ss) End Else begin if not object_id('tempdb..'+@temptable) is null exec('drop table tempdb..'+ @temptable)      
if @Checkflag = 'False' set @ss='SELECT isignseq,ino_id,1 as zt into tempdb..'+@temptable+' FROM gl_accvouch inner join code ON gl_accvouch.ccode = code.ccode where ibook=0 and iperiod= '+convert(char,@iPer,0)+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) +' and ((code.bbank ^ code.bcash) =1) and ((not (ccheck is null)) and (ccashier is null)) GROUP BY isignseq,ino_id Union SELECT isignseq,ino_id,0 as zt From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (not (ccheck is null) and iflag is null or ccheck is null and iflag=1) GROUP BY isignseq,ino_id' else set @ss='SELECT isignseq,ino_id,1 as zt into tempdb..'+@temptable+' FROM gl_accvouch inner join code ON gl_accvouch.ccode = code.ccode where ibook=0 and iperiod= '+convert(char,@iPer,0)+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) +' and ((code.bbank ^ code.bcash) =1) and (ccashier is null) GROUP BY isignseq,ino_id Union SELECT isignseq,ino_id,0 as zt From gl_accvouch where ibook=0 and iperiod= '+convert(char,@iPer,0) +(case when @tcond='' then '' else ' and (' + @tcond + ')' end)+' and (iflag is null or ccheck is null and iflag=1) GROUP BY isignseq,ino_id'      
exec (@ss) exec('SELECT isignseq,ino_id,sum(zt) as zt1 into tempdb..' + @temptable2 + ' from tempdb..'+@temptable+' group by isignseq,ino_id') set @ss='select '+convert(char,@iPer,0)+' as iperiod,isignseq,ino_id from tempdb..' + @temptable2 + ' Where zt1 = 0 '+(case when @tcond='' then '' else ' and (' + @tcond + ')' end) insert GL_mpostcond1 exec (@ss) if not object_id('tempdb..'+@temptable2) is null exec('drop table tempdb..'+ @temptable2) End      
GO      
SET QUOTED_IDENTIFIER OFF      
GO      
SET ANSI_NULLS ON      
GO

如果是用友T310.8plus1之后的版本,包括用友T310.8plus1普及版和标准版请直接安装最新的补丁就行了,补丁下载地址在论坛中有哦:http://edu.zzerp.net

温馨提示:近期载地址失效频繁,如链接失效请点击此处查阅详情!

相关文章

用友财务软件T3企管通是否有操作记录以供查询

问:用友财务软件T3企管通中,在操作了T3企管通软件后,企管通软件是否可以查询某一操作员曾经操作过什么单据?或者操作员做过具体的什么操作?答:可以查询。友财务软件T3企管通为了方便追踪用户责任,系统...

T3如何修改固定资产原始卡片中的累计折旧

         用友财务软件免费下载网站提供T3用友通固定资产模块中原始卡版 上的累计折旧怎么修改?问题适用用友财务...

用友财务软件凭证打印时出现“-107”错误?

用友财务软件凭证打印时出现“-107”错误而无法打印凭证?此问题主要是由于在使用用友财务软件打印凭证时选项设置错误,纸张设置错误,打印机驱动错误等都有可能造成此问题。以下是具...

用友T3财务通普及版V11.2免费试用版下载地址

用友T3财务通普及版V11.2免费试用版下载地址

今天要给大家分享的是用友T3财务通普及版V11.2免费试用版下载地址,免费下载地址在文章底部,不想看下方的软件说明的朋友可以点击此处进行免费下载。用友T3财务通普及版V11.2适用于所有windows...

T3用友通标准版

T3用友通标准版

T3用友通标准版从客户实际需求出发,面向成长型企业开发设计,提高管理水平、优化运营流程,实现全面、精细化财务管理与业务控制的一体化管控信息平台,帮助企业快速、准确应对市场变化,支持稳定、安全、成熟的长...

登录用友T3提示:当前页面的脚本发生错误。

登录用友T3提示:当前页面的脚本发生错误。

问题现象:登录用友T3提示:当前页面的脚本发生错误。行:80,Char:4,错误:缺少标识符,字符串或数字?代码:0,URL..............,是否要在此页面上继续运行脚本,点击是后还是一样...

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。