if (MyTextBox.Text == String.Empty) { // the textbox is empty cmd.Parameters.Add("@per_m", SqlDbType.Float).Value = ; }
cmd.Parameters.Add("@per_m", SqlDbType.Float).Value = System.DBNull.Value;
<code> cmd.Parameters.AddWithValue("@per_m", MyTextBox.Text.Trim() == String.Empty ? DBNull.Value : (object)MyTextBox.Text); </code>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)