Using EntityDataSoruce and nullable column. How do I set update the column in my db to null?
Posted on 2010-09-13
Can anyone reliably get the EntityDataSource to save a nullable column to the databse as a "null" when bound to any of the controls, such as "FormView"?
I have tried using several different UpdateParameters (SessionParameter, ControlParamater, Parameter, etc). I have tried setting "ConvertEmptyStringToNull" to true and leaving the property off entirely. Nothing works. On my "Inserts" it works fine (but obviously to insert a record, it has to insert "something" if there is no value.)
(I have made sure the column is set to nullable = true in the Entity Designer.....)
I have tried binding that column to a label and setting the text value of the label to "".
In all these cases, I can successfully set the column to a value, just not to NULL.