Forcing a Null value for a date in Insert Statement
Posted on 2006-05-05
I am trying to Insert a row and within the list of elements (columns) being inserted is a date ina textbox going to a datetime column in sql server. I am checking the checked property of a companion (linked) control to see if checked. If it is not, then I set the textbox = "". On sql Server side I set to allow nulls. When I insert with textbox = "", I get 1/1/1900. I would like to have null. Is there an easy way to do this. The reason for dtime picker and textbox is that the dtp is not nullable and I just using a textbox to prevent it and update from the textbox but user will work off datetime picker.
SpecificallY, Can I get rid of the 1/1/1900 and replace with null