Error about Notice Board

12/26/2011 18:40 _Diavolino_#1
Hello All, i try to find one solution to one pb about notice board...
In fact when i put in game one Auction to the board i get ony things in my database and when i down the server, i get error conversion varchar in datetime. The same error that u can get with other stored process like error 0 for warehouse stored or take in item mall but resolved with one simply command but from board i dont arrive i show u the log in the rar joined ... Thx to help me <3

and here i publish the query problem xD
usp_Market_ADD
PHP Code:
USE [PS_GameData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Market_ADD]    Script Date: 12/26/2011 19:37:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO







ALTER    Proc 
[dbo].[usp_Market_ADD]

@
MarketID        int,
@
CharID         int,
@
MinMoney        int,
@
DirectMoney        int,
@
MarketType        tinyint,

@
GuaranteeMoney    int,
@
TenderCharID        int,
@
TenderMoney        int,
@
EndDate        datetime,

@
ItemID         int,
@
ItemUID         bigint,

@
Type             tinyint,
@
TypeID         tinyint,
@
Quality         int,
@
Gem1         tinyint,
@
Gem2         tinyint,
@
Gem3         tinyint,
@
Gem4         tinyint,
@
Gem5         tinyint,
@
Gem6         tinyint,
@
Craftname         varchar(20) = ''
@
Count         tinyint,
@
Maketime         datetime,
@
Maketype         char(1),
@
TenderCharName    varchar(20) = ''
AS

SET NOCOUNT ON

BEGIN TRAN

INSERT INTO 
[MarketItems]([MarketID], [ItemID], [ItemUID], [Type], [TypeID], [Quality], [Gem1], [Gem2], [Gem3], [Gem4], [Gem5], [Gem6], [Craftname], [Count], [Maketime], [Maketype])
VALUES( @MarketID, @ItemID, @ItemUID, @Type, @TypeID, @Quality, @Gem1, @Gem2, @Gem3, @Gem4, @Gem5, @Gem6, @Craftname, @Count, @Maketime,  @Maketype     )

IF( @@
ERROR <> )
BEGIN
    ROLLBACK TRAN
    
RETURN 0
END

INSERT INTO 
[Market]( [MarketID], [CharID], [MinMoney], [DirectMoney], [MarketType], [GuaranteeMoney], [TenderCharID], [TenderCharName], [TenderMoney],[EndDate])
VALUES( @MarketID, @CharID, @MinMoney, @DirectMoney, @MarketType, @GuaranteeMoney, @TenderCharID, @TenderCharName, @TenderMoney, @EndDate )

IF( @@
ERROR <> )
BEGIN
    ROLLBACK TRAN
    
RETURN 0
END

COMMIT TRAN

RETURN 1



SET NOCOUNT OFF 

andthe other pb of conversion i resolve by it...

PHP Code:
ALTER  Proc [dbo].[usp_Save_Guild_StoredItem_Add_E]

@
GuildID 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,
[
B]@MaketimeZ varchar(50),
@
Maketype char(1)

AS
DECLARE @
Maketime as datetime
SELECT 
@Maketime CONVERT(datetime, @MaketimeZ120)[/B
but the same on first dont work

I precise the management studio is french ... i was thinking to passed him in english but can correct this pb ... and i change my PsData in data base and stilll same pb

wait ur answer thx much:mofo:
12/28/2011 23:21 _Diavolino_#2
So i think no ideas from no one ... lol

Same if u get a little interest to this request ? xD please xD
12/29/2011 07:25 JohnHeatz#3
I haven't tested this, but I would, firstly, try to do this change:

Code:
INSERT INTO [MarketItems] ([MarketID], [ItemID], [ItemUID], [Type], [TypeID], 
[Quality], [Gem1], [Gem2], [Gem3], [Gem4], [Gem5], 
[Gem6], [Craftname], [Count], [Maketime], [Maketype])
VALUES (@MarketID, @ItemID, @ItemUID, @Type, @TypeID, @Quality, @Gem1, @Gem2, @Gem3, 
@Gem4, @Gem5, @Gem6, @Craftname, @Count, 
[B](convert(datetime, @Maketime))[/B],  @Maketype)
12/30/2011 14:12 _Diavolino_#4
Thx Much Will try today and will let u read the consequence xD

so a forcely this replace to my query to usp_Market_ADD still give error in dbagent and let all item from notice board disapear and no link between notice board game and database ... cuz i dont find this item in my database in market i means... maybe there is one story with usp_Market_INIT or usp_Market_DEL ??? Thx for ur help


Edit : The error come Well from this comvertion of varchar in datetime and this u should to increament in all query in fonction of market Notice Board...

...
@MaketimeZ varchar(50),
@Maketype char(1)
...
AS
DECLARE @Maketime as datetime
SELECT @Maketime = CONVERT(datetime, @MaketimeZ, 120)

And all the item put now sucess to be save and no error come on THx to ur Help love ur Work xD