- Joined
- Jul 1, 2008
- Messages
- 422
- Reaction score
- 42
Hello there i have a problem with a procedure!
If i execute in sql will say executed successfully!
If server try to use the procedure i get this error in server logs and no action in game:
The procedure is:
I ask for a posible fix !
I tryed various fixes but isnt working totaly.
Thank you for attention!
If i execute in sql will say executed successfully!
If server try to use the procedure i get this error in server logs and no action in game:
Code:
SendNoticeMail : [Microsoft][ODBC SQL Server Driver][SQL Server]The formal parameter "@pSvrNo" was not declared as an OUTPUT parameter, but the actual parameter passed in requested output.(1)
The procedure is:
Code:
ALTER PROCEDURE [dbo].[UspMailNoticeSend]
@pSender NVARCHAR(20),
@pMailType TINYINT,
[USER=2000133456]Pre[/USER]ceiver NVARCHAR(20),
[USER=2000106515]pti[/USER]tle NVARCHAR(40),
@pMain NVARCHAR(200),
@pKeepTerm TINYINT,
@pMoney BIGINT,
@pItemNo INT,
@pItemCnt INT,
@pDur INT,
@pMaxDur INT,
@pIsBind BIT,
@pUnBindCnt TINYINT,
[USER=2000177229]Penc[/USER]hantStep TINYINT,
[USER=43741]prem[/USER]ainMin INT,
[USER=43741]prem[/USER]ainBase INT,
@pValidMin INT = 0,
@pSvrNo SMALLINT = 0,
@pItemSerial BIGINT OUTPUT,
@pMailNo INT OUTPUT,
@pDate DATETIME OUTPUT,
@pRsMoney BIGINT OUTPUT
AS
SET NOCOUNT ON;
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DECLARE [USER=2000240975]ama[/USER]ilCnt INT
DECLARE @aReceiverNo INT
DECLARE [USER=2000006020]ASE[/USER]nderMoney BIGINT
DECLARE @aEndDate SMALLDATETIME
DECLARE @aRead TINYINT
SELECT @pMailNo = 0
, @pItemSerial = 0
, @pDate = GETDATE()
, @pRsMoney = 0
, [USER=2000240975]ama[/USER]ilCnt = 0
, @aReceiverNo = 0
, [USER=2000006020]ASE[/USER]nderMoney = 0
, @aRead = 0
IF(@pMailType <> 1)
BEGIN
RETURN (1);
END
IF(@pValidMin > 0)
BEGIN
SET @aEndDate = DATEADD("n", @pValidMin, GETDATE())
END
ELSE
BEGIN
SET @aEndDate = dbo.UfnGetEndDate(GETDATE(), 0)
END
SELECT @aReceiverNo = mPcNo FROM dbo.TblPc WHERE mPcNm = [USER=2000133456]Pre[/USER]ceiver
IF( @aReceiverNo = 0)
BEGIN
RETURN (2);
END
SELECT @pMailNo = ISNULL(MAX(mMailNo), 0) + 1 FROM dbo.TblPcMail WHERE mPcNo = @aReceiverNo
SELECT [USER=2000240975]ama[/USER]ilCnt = COUNT(mPcNo) FROM dbo.tblPcMail WHERE mPcNo = @aReceiverNo AND mMailType = @pMailType
BEGIN TRY
BEGIN TRAN
IF( @pItemNo <> 0 )
BEGIN
EXEC dbo.UspGetItemSerial @pSvrNo, @pItemSerial OUTPUT;
IF @pItemSerial <= 0
BEGIN
RAISERROR ('Error raised in TRY block.', -- Message text.
16 , -- Severity.
2 -- State. 아이템 시리얼 생성 오류
);
END
INSERT INTO dbo.TblPcMailItem (
mRegDate, mSerialNo, mPcNo, mItemNo, mCnt,
mDur, mMaxDur, mIsBind, mUnBindCnt, mEnchantStep,
mRemainMin, mRemainBase, mEndDate )
VALUES ( @pDate, @pItemSerial, @aReceiverNo, @pItemNo, @pItemCnt,
@pDur, @pMaxDur, @pIsBind, @pUnBindCnt, [USER=2000177229]Penc[/USER]hantStep,
[USER=43741]prem[/USER]ainMin, [USER=43741]prem[/USER]ainBase, @aEndDate)
END
IF( [USER=2000240975]ama[/USER]ilCnt >= 24 )
BEGIN
SET @aRead = 2
END
INSERT INTO dbo.TblPcMail (
mRegDate, mPcNo, mMailNo, mMailType, mSender, mTitle, mMain, mMoney, mItemSerial, mRead, mKeepTerm)
VALUES ( @pDate, @aReceiverNo, @pMailNo, @pMailType, @pSender, [USER=2000106515]pti[/USER]tle, @pMain, @pMoney, @pItemSerial, @aRead, @pKeepTerm)
COMMIT TRAN;
END TRY
BEGIN CATCH
ROLLBACK TRAN;
RETURN (1);
END CATCH
RETURN (0);
I ask for a posible fix !
I tryed various fixes but isnt working totaly.
Thank you for attention!
Last edited: