Hello,
how can I handle null values in the following code? The problem is if user don't fill the textfield (end_date.Text) i get an error message even thought END_DATE database field is nullable.
SqlCommand command = new SqlCommand(sproc, conn); command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@END_DATE",SqlDbType.DateTime).Value = Convert.ToDateTime(end_date); //end_date is a string
|
Thank you in advance.