SQL implicit conversion error
I have been running v5 and v6 side by side for a while now and v6 has been working with querying nicely, but when i tried running stored procedures today I was running into the following error:
SqlException: Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query.
the sproc takes a varchar and an int, and I've been calling it like so:
sproc_name("12345", 67890)
in C# expression I've been highlighting the query and running it, and in v5 it works perfectly and v6 the error above.
is there something different about sprocs in v6?
thanks!
SqlException: Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query.
the sproc takes a varchar and an int, and I've been calling it like so:
sproc_name("12345", 67890)
in C# expression I've been highlighting the query and running it, and in v5 it works perfectly and v6 the error above.
is there something different about sprocs in v6?
thanks!
Comments
USE[TestDb]
GO
/****** Object: StoredProcedure [dbo].[testproc] Script Date: 10/3/2019 8:57:38 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE[dbo].[testproc]
@vchCol varchar(100),
@intCol int
AS
SET NOCOUNT ON
DELETE
FROM dbo.testtable
WHERE varcol = @vchCol
AND intcol = @intCol
RETURN
Sql Server Version: Microsoft SQL Server 2005 - 9.00.5324.00 (X64)