找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 9960|回复: 28

[技巧] 商贸通录入单据提示系统忙解决方法

  [复制链接]
发表于 2010-5-31 10:57:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
在查询分析器里找到那个数据库打上一下的补丁



SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO







ALTER                           PROCEDURE [P_GetBillSN]
@i_MacMark varchar(30),
@i_BillType int,
@i_BillDate varchar(10),
@i_OperID int,
@i_DftOper int   = -1,   
@i_BillSN varchar(100)  = '',   
@o_BillSN varchar(100) output
AS
Declare @Result  int,
@Rule1  int,
@Rule2  int,
@Rule3  int,
@Rule4  int,
@DispMac bit,
@Sign1  varchar(30),
@Sign2  varchar(30),
@Sign3  varchar(30),
@Sign4  varchar(30),
@Sign5  varchar(30),
@Sign6  varchar(30),
@Sign7  varchar(30),
@Sign8  varchar(30),
@Sign9  varchar(30),
@Sign10  varchar(30),
@OperCode varchar(50),
@tmpSN  varchar(100)
Declare @tmpSign varchar(30),
@j  int,
@TranSyb smallint

set nocount on
-- 'P_GetBillSN'
set @i_BillSN = isNull(@i_BillSN, '')
if @i_DftOper = -2
begin
set @TranSyb = 0
set @i_DftOper = -1
end else
set @TranSyb = 1
if (@i_BillSN = '') and (@TranSyb = 1)
begin
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
begin tran GetBillSNPrc
end
Select @OperCode=u_Code from Employee where s_ID=@i_OperID
Select @Rule1=Rule1, @Rule2=Rule2, @Rule3=Rule3, @Rule4=Rule4, @DispMac=MacMark from BillSNRule where s_ID=1

Select @Sign1=IsNull(Sign1,''), @Sign2=IsNull(Sign2,''), @Sign3=IsNull(Sign3,''), @Sign4=IsNull(Sign4,''), @Sign5=IsNull(Sign5,''), @Sign6=IsNull(Sign6,''),
       @Sign7=IsNull(Sign7,''), @Sign8=IsNull(Sign8,''), @Sign9=IsNull(Sign9,''), @Sign10=IsNull(Sign10,'')
from BillType where BillType=@i_BillType
set @o_BillSN=''
if @DispMac=1
set @o_BillSN = @i_MacMark + '-'
set @j=1
while @j<=10
begin
select @tmpSign = case @j when 1 then @Sign1 when 2 then @Sign2
      when 3 then @Sign3 when 4 then @Sign4
      when 5 then @Sign5 when 6 then @Sign6
      when 7 then @Sign7 when 8 then @Sign8
      when 9 then @Sign9 when 10 then @Sign10
     end
if @tmpSign<>''
begin
  exec P_SetBillSN @i_MacMark, @i_BillType, @i_BillDate,  @i_OperID, @OperCode, @Rule1, @Rule2, @Rule3, @Rule4, @tmpSign, @i_DftOper, @tmpSN output
  set @o_BillSN=@o_BillSN+@tmpSN
end
set @j=@j+1
end
if ((@i_BillSN='') and (@Rule3=0)) or (@i_BillType in (66, 67)) --
begin
exec @Result = P_SetBillCount @i_MacMark, @i_BillDate, @i_BillType, @i_OperID, @Rule1, @Rule2, @Rule3, @Rule4, @i_BillSN
if @@Error<>0 or @Result<0 return -1003
end

---------------------------------------------------------------------------------
Success:
if (@i_BillSN = '') and (@TranSyb = 1)
begin
  Commit tran GetBillSNPrc
  SET TRANSACTION ISOLATION LEVEL READ COMMITTED
end
return 0     
Error:
if (@i_BillSN = '') and (@TranSyb = 1)
begin
  rollback tran GetBillSNPrc
  SET TRANSACTION ISOLATION LEVEL READ COMMITTED
end
return -1









GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
发表于 2016-5-18 09:23:07 | 显示全部楼层
谢谢分享  没学过数据库,不明白这些的意思
回复 点赞 拍砖

使用道具 举报

发表于 2017-3-13 16:38:11 | 显示全部楼层
真的不懂这些,能有人解释下吗
回复 点赞 拍砖

使用道具 举报

发表于 2016-4-7 09:05:40 | 显示全部楼层
谢谢分享~~~~
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2010-6-1 09:01:02 | 显示全部楼层
没人来看呢?
发表于 2010-6-1 15:25:35 | 显示全部楼层
没学过数据库,不明白这些的意思,还真不敢用
发表于 2010-6-2 09:15:46 | 显示全部楼层
先收藏了。但,还没遇到过这个问题。是什么时候会出现这个问题捏
 楼主| 发表于 2010-6-4 08:53:01 | 显示全部楼层
升级的时候可能会遇到
发表于 2010-6-4 09:16:10 | 显示全部楼层
先收藏下,遇到时也有办法
发表于 2010-11-15 16:25:45 | 显示全部楼层
收藏了....
发表于 2010-11-19 08:32:14 | 显示全部楼层
学习了。。。。。。
发表于 2010-11-19 09:00:48 | 显示全部楼层
看了 暂时用不到
发表于 2010-12-14 12:58:07 | 显示全部楼层
存下来等需要时看下
发表于 2010-12-22 10:02:26 | 显示全部楼层
原  来  如  此
发表于 2010-12-27 15:59:23 | 显示全部楼层
就是,,,没有遇到过呢!!!
发表于 2010-12-27 20:48:45 | 显示全部楼层
上面的代码解释下什么意思吗?我有碰到过哦
发表于 2011-1-19 11:51:48 | 显示全部楼层
看不懂呀, 祥细是怎么操作!!请分享!谢谢。。。。
发表于 2011-1-25 00:43:56 | 显示全部楼层
看不懂。不过学习了
您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-4-20 05:21 , Processed in 0.046178 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表