You must use (for example)~
sql.Parameters.AddWithValue("@NewDeliveryDate", DBNull.Value);
instead of using (for example)~
sql.Parameters.AddWithValue("@NewDeliveryDate", null);
, assuming sql is a SqlCommand object
, otherwise you will get an SQL exception after executing the SQL command.