error 0

02/17/2011 20:02 abrasive#16
Can you paste you usp_Save_User_BuyPointItems_NCash stored procedure here and wrap it in code tags?
02/17/2011 20:05 topazee#17
That is that I have in this file

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
02/17/2011 20:20 abrasive#18
Is anything underlined in red?

Also these have same random spaces in them:
Code:
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCo de,UseDate)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@Produc tCode,@UseDate)
02/17/2011 20:33 topazee#19
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...]
02/17/2011 20:39 abrasive#20
Quote:
Originally Posted by topazee View Post
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...]
That's not actually an error, it's just a built in function for SQL Server.

Do you get an error when you run this query, or does it work successfully?
Code:
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate)
VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')
02/17/2011 20:41 topazee#21
just when I buy an item in item mall that gives me an error 0
when I go see my log its giving me this error
02/17/2011 20:43 topazee#22
just when I buy an item in item mall that gives me an error 0
when I go see my log its giving me this error
02/17/2011 20:46 abrasive#23
Ok, but did you try running that query?
02/17/2011 20:51 topazee#24
this requete?

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
02/17/2011 20:55 abrasive#25
No, this query I asked you to run and tell me what happend:
Code:
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate)
VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')
02/17/2011 20:59 topazee#26
j 'is code inserted new query?

Quote:
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. ')
sorry I'm beginner
02/17/2011 21:09 abrasive#27
I don't understand your question.

I wanted you to click on New Query and paste this in and execute it:
Code:
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. ')
Then let me know if it returns an error or not
02/17/2011 21:13 topazee#28
Quote:
Originally Posted by abrasive View Post
I don't understand your question.

I wanted you to click on New Query and paste this in and execute it:
Code:
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. ')
Then let me know if it returns an error or not
Msg 102, Level 15, State 1, Line 2
Syntaxe incorrecte vers 'AC_1000 75_1'.
02/17/2011 21:15 abrasive#29
Opps, I meant this one:
Code:
INSERT INTO PointLog(UseType,UserUID,CharID,UsePoint,ProductCode,UseDate)
VALUES(1,1,3,349,'AC_1000 75_1','2011-02-17 19:41:38')
02/17/2011 21:19 topazee#30
Msg 242, Level 16, State 3, Line 1
La conversion d'un type de données CHAR en type DATETIME a donné une valeur hors limite de date et d'heure.
L'instruction a été arrêtée.