Hummm... I tried with two items and got this log:
Code:
2010-10-20 11:53:22 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Server 'PS_NCASH' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2010-10-20 11:53:22 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'B1_Robag0001')}
2010-10-20 11:53:46 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Server 'PS_NCASH' is not configured for RPC., SQL STATE: 42000, NATIVE ERROR: 7411 (0x1CF3)
2010-10-20 11:53:46 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'SH1_0001')}
Store procedure
Code:
USE [PS_GameData]
GO
/****** Object: StoredProcedure [dbo].[usp_Save_User_NCash] Script Date: 10/20/2010 12:10:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Save_User_NCash]
@BuyUserUID int,
@TargetUserID int,
@ProductCode varchar(20)
AS
SET NOCOUNT ON
DECLARE @Ret int
DECLARE @OrderNumber int
DECLARE @RemainPoint int
SET @Ret = 0
/*========================================
아이템 구매
구매일 경우 구매 유저 UID 와 받는 유저 UID를 똑같이 입력하면 됩니다.
procRequestOrderProductByGame
구매유저 UID @buyClientUserNumber BIGINT
받는유저 UID @receiveClientUserNumber BIGINT
아이템코드 @itemCode VARCHAR(50)
결과 코드 @resultCode SMALLINT OUTPUT
결제 후 잔액 @cashBalanceAfterOrder INT OUTPUT
구매번호 @orderNumber INT OUTPUT
resultCode
0 성공
1 잔액부족
2 해당 사용자 존재하지 않음
3 해당 아이템이 존재하지 않음
5 DB오류
6 기타오류
=========================================*/
EXEC [PS_NCASH].[Billcrux30].dbo.procRequestOrderProductByGame @BuyUserUID,@TargetUserID,@ProductCode,@Ret OUTPUT, @RemainPoint OUTPUT, @OrderNumber OUTPUT
IF( @@ERROR <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, 100 )
SET @Ret = 7
RETURN @Ret
END
IF ( @Ret <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, @Ret )
END
SET @Ret = CASE @Ret
WHEN 0 THEN 0
WHEN 1 THEN 10
WHEN 2 THEN 1
WHEN 3 THEN 6
ELSE 7
END
RETURN @Ret
SET NOCOUNT OFF
--SET XACT_ABORT OFF

---------- Post added at 12:04 PM ---------- Previous post was at 10:56 AM ----------
I tried your own solution on this topic: http://forum.ragezone.com/f557/ps_db...-error-665082/
Now I have the following log:
Code:
2010-10-20 12:41:27 err=-1, [Microsoft][ODBC SQL Server Driver]Tempo excedido, SQL STATE: HYT00, NATIVE ERROR: 0 (0x0)
2010-10-20 12:41:27 SaveGiftPointItem 25 GMA-Goddess qerr=100, {? = call [usp_Save_User_NCash](7,36,'SH1_0001')}
With this procedure:
Code:
use PS_GameData;
GO
drop procedure [dbo].[usp_Save_User_NCash]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE Proc [dbo].[usp_Save_User_NCash]
@BuyUserUID int,
@TargetUserID int,
@ProductCode varchar(20)
AS
SET NOCOUNT ON
DECLARE @Ret int
DECLARE @OrderNumber int
DECLARE @RemainPoint int
SET @Ret = 0
/*========================================
아이템 구매
구매일 경우 구매 유저 UID 와 받는 유저 UID를 똑같이 입력하면 됩니다.
procRequestOrderProductByGame
구매유저 UID @buyClientUserNumber BIGINT
받는유저 UID @receiveClientUserNumber BIGINT
아이템코드 @itemCode VARCHAR(50)
결과 코드 @resultCode SMALLINT OUTPUT
결제 후 잔액 @cashBalanceAfterOrder INT OUTPUT
구매번호 @orderNumber INT OUTPUT
resultCode
0 성공
1 잔액부족
2 해당 사용자 존재하지 않음
3 해당 아이템이 존재하지 않음
5 DB오류
6 기타오류
=========================================*/
EXEC dbo.procRequestOrderProductByGame @BuyUserUID,@TargetUserID,@ProductCode,@Ret OUTPUT, @RemainPoint OUTPUT, @OrderNumber OUTPUT
IF( @@ERROR <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, 100 )
SET @Ret = 7
RETURN @Ret
END
IF ( @Ret <> 0 )
BEGIN
INSERT INTO PointErrorLog( UserUID, CharID, ProductCode, Ret) VALUES( @BuyUserUID, NULL, @ProductCode, @Ret )
END
SET @Ret = CASE @Ret
WHEN 0 THEN 0
WHEN 1 THEN 10
WHEN 2 THEN 1
WHEN 3 THEN 6
ELSE 7
END
RETURN @Ret
SET NOCOUNT OFF
--SET XACT_ABORT OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO