Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 04, 2012 03:15 PM by YunJiang
Apr 30, 2012 03:54 AM|LINK
I have a formview which is connected to an MS SQL database. I have a couple of fields that sometimes have nothing in the data fields. I want formview to databind '' instead of Null back into the database on an update or insert. Is there a way to do this
or am I forced to store Null if their is nothing to store?
Apr 30, 2012 04:44 AM|LINK
You mean to say, you want to store empty string in the database rather than Null?
If so, then you can achieve it by handling them in "ItemUpdating", and "ItemInserting" of FormView
May 04, 2012 03:15 PM|LINK
You can set BoundField.ConvertEmptyStringToNull Property to a false or true,which gets or sets a value indicating whether empty string values ("") are automatically converted to null values when the data field is updated in
the data source.