![]() |
Manor procedures
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)Code:
ALTER PROCEDURE [dbo].[lin_SetLastTaxUpdate] SaveManorInfo Code:
@last_changed varchar |
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
|
can u show me your stored procedures?
|
FidoW
Can you share your fix please. I'm facing the same problem |
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 |
Thanks for the fix. It's useful (and amazingly simple) =)
|
Thanks for the fix,
I have been working on this error for several weeks with no results. |
Thank you so much.
|
| All times are GMT. The time now is 15:27. |