Some Errors in SQL

02/13/2012 12:08 thetruestarr1337#1
Code:
err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Fehler beim Konvertieren des varchar-Datentyps in datetime., SQL STATE: 42000, NATIVE ERROR: 8114 (0x1FB2)

SaveBuyPointItem 45 *CENSORED* qerr=0, {?=call usp_Save_User_BuyPointItems_NCash(16,45,0,'Brilliant','2012-02-13 11:42:34')}
Ist im PS_DBAGENT__system.log__* zu finden...
Der Fehler tritt aber nur auf bei kauf von AP Items.
Ein anderer Bug ist:
dc-rollback ( Nach dem DC der Spieler ist ein Rollback )
char erstellung ( Bei Char erstellung DC error 0 )


The error occurs only when buy AP items.
Another bug:
dc-rollback (After DC, players got a roll back)
char creation ( after char creation DC error 0 )
02/13/2012 13:22 RebeccaBlack#2
Check that SP in PS_GameData. Something is wrong with it. I'd check the last value, make sure the Parameter is set to datetime not varchar.
02/13/2012 13:38 thetruestarr1337#3
This is my SP:

Code:
USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Save_User_BuyPointItems_NCash]    Script Date: 02/13/2012 13:37:49 ******/
SET ANSI_NULLS ON
GO
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,ProductCode,UseDate)
VALUES(@UseType,@UserUID,@CharID,@UsePoint,@ProductCode,@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/13/2012 13:46 RebeccaBlack#4
Sorry, I ran that in my own database, and executed it. No problems.

Try this on your own database:
PHP Code:
EXEC PS_GameData.dbo.usp_Save_User_BuyPointItems_NCash 16,45,0,'Brilliant','2012-02-13 11:42:34' 
02/13/2012 13:54 thetruestarr1337#5
Quote:
Originally Posted by RebeccaBlack View Post
Sorry, I ran that in my own database, and executed it. No problems.

Try this on your own database:
PHP Code:
EXEC PS_GameData.dbo.usp_Save_User_BuyPointItems_NCash 16,45,0,'Brilliant','2012-02-13 11:42:34' 

Successful, but this error occurs at some more Items and at character creation the players get a DC..
02/13/2012 15:48 eQuiNoX.#6
Kann es sein, dass du die deutsche Version des SQL-Servers installiert hast? Man achte auf das Datum: 13.

Siehe: [Only registered and activated users can see links. Click Here To Register...]
02/13/2012 16:03 thetruestarr1337#7
Ja ist installiert.. kommt man um die neuinstallation von sql rum ?
02/13/2012 19:21 RebeccaBlack#8
Nevermind. A good and smart friend (castor) corrected me. The error IS the datetime column. You need to modify the SP so that the parameter is varchar. Then extract from that and create the datetime variable.
02/13/2012 20:31 thetruestarr1337#9
*FIXED* with english SQL Instance