Can you paste you usp_Save_User_BuyPointItems_NCash stored procedure here and wrap it in code tags?
Quote:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Save_User_BuyPointItems_NCash]
@UserUID int,
@CharID int,
@UsePoint int,
@ProductCode varchar(20),
@UseDate datetime
AS
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @UseType int
DECLARE @ReturnValue int
SET @UseType = 1 -- 掘衙
BEGIN DISTRIBUTED TRANSACTION
EXEC @ReturnValue = PS_UserData.dbo.usp_Update_UserPoint @UserUID, @UsePoint
IF ( @ReturnValue < 0 )
BEGIN
GOTO ERROR
END
-- 檣 離馬(Old, 夥煎 UPDATE僥 陳塒唳辦 醴憮纂陛 號檜 橾橫陴)
--UPDATE PS_UserData.dbo.Users_Master SET Point=Point-@UsePoint WHERE UserUID=@UserUID
--IF( @@ERROR<>0 OR @@ROWCOUNT=0)
--BEGIN
-- GOTO ERROR
--END
-- 檣 煎斜 晦煙
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCo de,UseDate)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@Produc tCode,@UseDate)
IF( @@ERROR<>0)
BEGIN
GOTO ERROR
END
COMMIT TRAN
RETURN 1
ERROR:
ROLLBACK TRAN
RETURN -1
SET XACT_ABORT OFF
SET NOCOUNT OFF
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCo de,UseDate) VALUES(@UseType,@UserUID,@CharID,@UsePoint,@Produc tCode,@UseDate)
That's not actually an error, it's just a built in function for SQL Server.Quote:
nothing is said or written in red
there was just one error in pink
[Only registered and activated users can see links. Click Here To Register...]
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate) VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')
Quote:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Save_User_BuyPointItems_NCash]
@UserUID int,
@CharID int,
@UsePoint int,
@ProductCode varchar(20),
@UseDate datetime
AS
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @UseType int
DECLARE @ReturnValue int
SET @UseType = 1 -- 掘衙
BEGIN DISTRIBUTED TRANSACTION
EXEC @ReturnValue = PS_UserData.dbo.usp_Update_UserPoint @UserUID, @UsePoint
IF ( @ReturnValue < 0 )
BEGIN
GOTO ERROR
END
-- 檣 離馬(Old, 夥煎 UPDATE僥 陳塒唳辦 醴憮纂陛 號檜 橾橫陴)
--UPDATE PS_UserData.dbo.Users_Master SET Point=Point-@UsePoint WHERE UserUID=@UserUID
--IF( @@ERROR<>0 OR @@ROWCOUNT=0)
--BEGIN
-- GOTO ERROR
--END
-- 檣 煎斜 晦煙
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCo de,UseDate)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@Produc tCode,@UseDate)
IF( @@ERROR<>0)
BEGIN
GOTO ERROR
END
COMMIT TRAN
RETURN 1
ERROR:
ROLLBACK TRAN
RETURN -1
SET XACT_ABORT OFF
SET NOCOUNT OFF
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate) VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')
sorry I'm beginnerQuote:
INSERT INTO PointLog (UseType, UserUID, Charid, UsePoint, ProductCode, UseDate)
VALUES (1,1,3,349 'AC_1000 75_1', '2011-02-17 7:41:38 p.m. ')
INSERT INTO PointLog (UseType, UserUID, Charid, UsePoint, ProductCode, UseDate) VALUES (1,1,3,349 'AC_1000 75_1', '2011-02-17 7:41:38 p.m. ')
Msg 102, Level 15, State 1, Line 2Quote:
I don't understand your question.
I wanted you to click on New Query and paste this in and execute it:
Then let me know if it returns an error or notCode:INSERT INTO PointLog (UseType, UserUID, Charid, UsePoint, ProductCode, UseDate) VALUES (1,1,3,349 'AC_1000 75_1', '2011-02-17 7:41:38 p.m. ')
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate) VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')