![]() |
|
|
#1 |
|
Архивный участник
Join Date: May 2005
Posts: 979
|
hi all
it is normal if players must set manor every day? First time I think yes..but now I see sometimes in cacheD some errors with procedure lin save ..last manor.. something like that.. problems with converting varchar to datetime.. I tried to edit manor table and save manor procedures and changed datetime to varchar.. but still get some errors.. Can anyone post here your manor procedures? Code:
01/02/2007 06:00:xx.xx4, Error sql: EXEC lin_SetLastTaxUpdate '2007-0-1 12:0:52', '2007-0-2 0:0:4', '2007-0-2 6:0:8' (0) 01/02/2007 06:00:xx.xx4, Error sql: exec lin_SaveManorInfo 7, 7, 0, 0, 1, '0-0-0 0:0:0' (0) 01/02/2007 06:00:xx.xx4, Error 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to datetime. 01/02/2007 06:00:xx.xx4, Error 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to datetime. 01/02/2007 06:00:xx.xx4, [.\Socket.cpp][12448] cannot update last tax change date. 01/02/2007 06:00:xx.xx4, [.\ManorDb.cpp][207]Cannot Save manor info, [7]-[7][0][0] Code:
ALTER PROCEDURE [dbo].[lin_SetLastTaxUpdate] ( @income varchar, @tax varchar, @manor varchar SaveManorInfo Code:
@last_changed varchar |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Umm, im not sure, a lot of time since i fixed that.. but the fix was converting input values in the store procedure to a valid datetime format... or something like that
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: May 2005
Posts: 979
|
can u show me your stored procedures?
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Sep 2006
Posts: 882
|
FidoW
Can you share your fix please. I'm facing the same problem |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Dec 2006
Posts: 16
|
ALTER PROCEDURE dbo.lin_SetLastTaxUpdate
( @income varchar(100), @tax varchar(100), @manor varchar(100) ) AS declare @income_ datetime declare @tax_ datetime declare @manor_ datetime set @income =left(@income,5) + cast((cast(replace(substring(@income,6,2),'-','') as int) + 1) as varchar) + substring(@income, charindex ('-', @income, 6),100) set @tax =left(@tax,5) + cast((cast(replace(substring(@tax,6,2),'-','') as int) + 1) as varchar) + substring(@tax, charindex ('-', @tax, 6),100) set @manor =left(@manor,5) + cast((cast(replace(substring(@manor,6,2),'-','') as int) + 1) as varchar) + substring(@tax, charindex ('-', @tax, 6),100) set @income_ = convert(datetime, @income) set @tax_ = convert(datetime, @tax) set @manor_ = convert(datetime, @manor) SET NOCOUNT ON IF EXISTS(SELECT * FROM castle_tax) BEGIN UPDATE castle_tax SET income_update = @income_, tax_change = @tax_, manor_reset = @manor_ END ELSE BEGIN INSERT INTO castle_tax VALUES ( @income_, @tax_, @manor_) END |
|
|
|
|
#6 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
Thanks for the fix. It's useful (and amazingly simple) =)
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Jun 2006
Posts: 64
|
Thanks for the fix,
I have been working on this error for several weeks with no results. |
|
|
|
|
#8 |
|
Архивный участник
Join Date: Jun 2006
Posts: 100
|
Thank you so much.
|
|
|
|
|