I have some code I am converting from 2008 to 2013 and found a situation where the code is handled differently.
I have a statement:
cmd.Parameters.Add(new SqlParameter("@NameType", (byte)1))
This works correctly in 2008 and 2013 and puts a "1" in the value field
If I do:
cmd.Parameters.Add(new SqlParameter("@NameType", (byte)0))
it puts a "0" in the value of the parameter in VS2008 but in VS2013, it puts a null.
I am trying to find out if this is an issue only with cmd.Parameters.Add or is it with areas?
I did do:
(byte)dr["NameType"])
And if the value is 0 it will return a 0.
Since this is a fairly large project I need to find out if there are other areas where this could be an issue.
Thanks,
Tom
I have a statement:
cmd.Parameters.Add(new SqlParameter("@NameType", (byte)1))
This works correctly in 2008 and 2013 and puts a "1" in the value field
If I do:
cmd.Parameters.Add(new SqlParameter("@NameType", (byte)0))
it puts a "0" in the value of the parameter in VS2008 but in VS2013, it puts a null.
I am trying to find out if this is an issue only with cmd.Parameters.Add or is it with areas?
I did do:
(byte)dr["NameType"])
And if the value is 0 it will return a 0.
Since this is a fairly large project I need to find out if there are other areas where this could be an issue.
Thanks,
Tom