"Ошибка при преобразовании типа данных varchar к datetime"
Run the following Query should fix your bug.
Code:
USE [PS_GameData]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Proc [dbo].[usp_Save_Char_Product_Item_E]
@ServerID tinyint,
@UserUID int,
@BankSlot tinyint,
@CharID int,
@ItemUID bigint,
@Bag tinyint,
@Slot tinyint,
@ItemID int,
@Type tinyint,
@TypeID tinyint,
@Quality smallint, --int
@Gem1 tinyint,
@Gem2 tinyint,
@Gem3 tinyint,
@Gem4 tinyint,
@Gem5 tinyint,
@Gem6 tinyint,
@Craftname varchar(20) = '',
@Count tinyint,
@Maketime datetime,
@Maketype varchar(1) --char(1)
AS
--SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @ProductCode varchar(20)
DECLARE @OrderNumber int
DECLARE @VerifyCode bigint
DECLARE @BuyDate datetime
IF(@Quality >= 5000)
BEGIN
SET @Quality=0
END
BEGIN DISTRIBUTED TRANSACTION
-- Add inventory
INSERT INTO CharItems(CharID,Bag,Slot,ItemID,Type,TypeID,ItemUID,Quality,Gem1,Gem2,Gem3,Gem4,
Gem5,Gem6,CraftName,[Count],Maketime,Maketype)
VALUES(@CharID,@Bag,@Slot,@ItemID,@Type,@TypeID,@ItemUID,@Quality,@Gem1,@Gem2,@Gem3,@Gem4,
@Gem5,@Gem6,@Craftname,@Count,@Maketime,@Maketype)
-- Logging receipt of goods
SELECT @ProductCode=ProductCode,@OrderNumber=OrderNumber,@VerifyCode=VerifyCode,@BuyDate=BuyDate
FROM PS_Billing.dbo.Users_Product
WHERE UserUID=@UserUID AND Slot=@BankSlot
INSERT INTO ProductLog(ServerID,UserUID,CharID,ItemID,ItemUID,Quality,ItemCount,ProductCode,OrderNumber,VerifyCode,BuyDate,ReceiveDate)
VALUES(@ServerID,@UserUID,@CharID,@ItemID,@ItemUID,@Quality,@Count,@ProductCode,@OrderNumber,@VerifyCode,@BuyDate,@Maketime)
-- Deleting the bank storage
DELETE FROM PS_Billing.dbo.Users_Product WHERE UserUID=@UserUID AND Slot=@BankSlot
IF( @@ERROR=0 AND @@ROWCOUNT=1)
BEGIN
COMMIT TRAN
RETURN 1
END
ELSE
BEGIN
ROLLBACK TRAN
RETURN -1
END
SET XACT_ABORT OFF
--SET NOCOUNT OFF
Сделай @Maketime типом varchar, а потом через функцию Convert преобразуй в datetime. Ошибка возникает из-за того, что функция на входе ждет datetime, а ей приходит varchar.
Подробнее описано тут: Так же возникнет ошибка, которую можно исправить так:
[RELEASE] FIX for Bank teller DC problem 11/04/2015 - Shaiya PServer Guides & Releases - 10 Replies i have not fully 100 % tested with populated server and stuff like that it was tested on my local server first atempt proved dc happened aproxamently 15 mins after removeing an item from the bank teller due to errors in procs so i fixed what i seen and retryed again and lasted aproxamently 30 mins with absolutly no dc opened the db and checked the tabel the item removed from the bank teller had vanished from the tabel as it should i baught a stack of glod bars just after removeing the item from...
Bank Teller 12/19/2012 - Shaiya Private Server - 5 Replies Hey. How to add some items to the bank? Which table to use?
ELITE TELLER V2 05/07/2012 - WarRock Hacks, Bots, Cheats & Exploits - 2 Replies V2 HAS BEEN JUST BEEN CODED!!
hAVE FUN!!:bandit:
Use this smart program to tell your friends about eltepvpers.com;)
Scans: https://www.virustotal.com/file/57dcecc5cc3c93fdab 294e1c84b8e0328df54a3deca7b5902b0f402c17be6d90/ana lysis/1336384108/
Downloads: 2shared - Upload complete
Elite teller v1 05/06/2012 - WarRock Hacks, Bots, Cheats & Exploits - 2 Replies Hey, This Program helps you help Elitepvpers.com By sending this to you friends telling them about Hacks and warrock Hacks, Completely Safe And Free.
Virus scans: https://www.virustotal.com/file/6119e99e0cc710bba7 284127190746efcb4c1e20b0bcb263ba85c47daa75fe30/ana lysis/1336297902/
MADE BY GREENMATS!
Link Safe: 2shared - Upload complete
[Help]Bank Teller 08/22/2010 - Shaiya Private Server - 2 Replies Hey guys and Gals
I know the stored Proc to send items to the Bank teller and it works great again thumbs up for the people who answered me. My problem is that when the person takes the item out it Dced them shortly after and the item is back the bank. This causes me problems as you can imagine.
I have been messing around with it trying to figure out why it is doing that and can't find anything..
If anyone has any help in this matter that would be amazing:handsdown:
Thank you!