Using Asp.Net (C#) I'm submitting the following value to a field in the DB:
//Adding to parameters (for stored proc)
command.Parameters.Add( "MyField", SqlDbType.Bit, 1 ).Value = "1";
How do I fix this issue? What am I doing wrong?
According to MSDN, SqlDbType.Bit is:
An unsigned numeric value that can be 0, 1, or null.
So, try:
command.Parameters.Add( "MyField", SqlDbType.Bit, 1 ).Value = 1;