I have a strongly typed DataSet (dsContacts) that is bound to a textbox (txtFirstName). I use DataAdapters to Fill my DataSet with data from SQL Server stored procedures.
If a user creates a contact with no First Name, it is initially Null in the database. If a user then edits the record and puts in a value, that value is in the database. If a user then removes the value and saves it back to SQL Server, the value in the database is an empty string. I want this value to be Null.
I have a bunch of Update procedures that I would like this to happen with. Is there a way to force the DataSet to work this out rather than editing all of my SPs to have a NullIf() statement? Is there another approach that might be better?
Thanks in advance!




Reply With Quote