I think since the
SQL server
expects
DBNull.Value
instead of
null
, when employeeSocialTitle is
null
, it is replaced with
default
. To avoid this the null coalescing operator can be used as follows:
cmd.Parameters.Add("@employeeSocialTitle", SqlDbType.Char, 5).Value = employeeSocialTitle ?? DBNull.Value;