Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 error datetime

Author  Topic 

haskoman
Starting Member

2 Posts

Posted - 2009-04-22 : 18:30:06
Hi help me please

i have Mssql 2000

i dont stend this error

2009-04-22 18:21:35 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar en datetime.,., SQL STATE: 42000, NATIVE ERROR: 8114 (0x1FB2)

2009-04-22 18:21:35 ::CreateCharacter 34 sfsdfdsfsdfd retVal=-1, qerr=-1, {?=call Usp_Save_Char_Item_Add_E(34,2678838460487368704, 0,5, 7006,7,6, 2400, 0,0,0,0,0,0, '',1,'2009-04-22 18:21:35','S')}

2009-04-22 18:21:35 err=0, , SQL STATE: 00000, NATIVE ERROR: 0 (0x0)


How to solve this problem if you help me please



SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-04-23 : 01:10:29
It means you have dirty data in your column.
One or more records do have invalid data, which can't be converted to a date.

This is what can happen when you don't use a proper datatype, smalldatetime or datetime.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

haskoman
Starting Member

2 Posts

Posted - 2009-04-23 : 18:22:00

Thank you for your answer but I see not how to solve it

the table or the error goes

CREATE Proc usp_Save_User_StoredItem_Add_E

@ServerID tinyint,
@UserUID int,
@ItemUID bigint,
@Slot tinyint,
@ItemID int,
@Type tinyint,
@TypeID tinyint,
@Quality smallint,
@Gem1 tinyint,
@Gem2 tinyint,
@Gem3 tinyint,
@Gem4 tinyint,
@Gem5 tinyint,
@Gem6 tinyint,
@Craftname varchar(20) = '',
@Count tinyint,
@Maketime datetime,
@Maketype char(1)

AS

--SET NOCOUNT ON

INSERT INTO UserStoredItems
(ServerID, UserUID, Slot, ItemID, Type, TypeID, ItemUID, quality, gem1, gem2, gem3, gem4,
gem5, gem6, craftname, [count], maketime, maketype)
VALUES(@ServerID, @UserUID, @Slot, @ItemID, @Type, @TypeID, @ItemUID, @Quality, @Gem1, @Gem2, @Gem3, @Gem4,
@Gem5, @Gem6, @Craftname, @Count, @Maketime, @Maketype)

IF(@@ERROR = 0)
BEGIN
RETURN 1
END
ELSE
BEGIN
RETURN -1
END

--SET NOCOUNT OFF

GO

Error

2009-04-22 18:21:35 err=-1, [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar en datetime.,., SQL STATE: 42000, NATIVE ERROR: 8114 (0x1FB2)

2009-04-22 18:21:35 ::CreateCharacter 34 sfsdfdsfsdfd retVal=-1, qerr=-1, {?=call Usp_Save_Char_Item_Add_E(34,2678838460487368704, 0,5, 7006,7,6, 2400, 0,0,0,0,0,0, '',1,'2009-04-22 18:21:35','S')}

2009-04-22 18:21:35 err=0, , SQL STATE: 00000, NATIVE ERROR: 0 (0x0)

help me please
Go to Top of Page
   

- Advertisement -