Home Forums SQL Server 2008 SQL Server Newbies SP & Function don't give "Error converting data type varchar to bigint" but once in the ASP.NET app they do RE: SP & Function don't give "Error converting data type varchar to bigint" but once in the ASP.NET app they do

  • Quick thought, the reason for passing parameters as string works in SQL is the implicit type casting it performs. This does not exist in VB/C# and therefore the data type of the variables must match the datatype of the parameters.

    😎

    As an example, let's say you are passing a value of zero (0), the SplParameterCollection expects (here in hex) 0x00000000 but when using the string value of "0", it is getting 0x00000030.