Good morning everybody.
I'm trying to add a null into a SQL Server DateTime column called ShippedDate. With the below code I get an error message that says "Nullable object must have a value". This is driving me crazy. How do I do this?
Code:private void InsertHeader(Guid inG) { DateTime now = DateTime.Now; string po = txtPoNumber.Text; string cn = ddlCustomer.Text; DateTime? shippeddate = null; OrderHeaderBll.Insert(inG, now, calStartDate.SelectedDate, po, cn, shippeddate.Value); }