I'm trying to execute this command but get an exception:
cmd.CommandText = @"insert into Foo (Column1, Column2)
values (@Parameter1, @Parameter2)";
cmd.Parameters.Add(new SqlParameter("@Parameter1", 'bar'));
cmd.Parameters.Add(new SqlParameter("@Parameter2", null));
The exception states that @Parameter2 is expected but was not supplied.
Actually I'm providing it with null value. So how can I insert this very null into nullable Column2?