I have a Form (Compact Framework, actually) with a few fields, a date and a string, among other things. Both TextBox controls are bound to properties in a BindindSource.
The BindindSource has a DataSet as its DataSource property, and the DataMember is a table in a SQL CE database.
When I want to add a new row, I call bindingSource.AddNew(), then bindingSource.MoveLast(). The form shows the default values (as defined in the DataSet) and I can edit all the fields.
To save the form, I call bindingSource.EndEdit() and insert the values from the DataSet row into the database, using a TableAdapter method. The date makes it into the database, the string does not. Instead, the default value for the string is saved, not the value that I typed in the text box.
When I inspect the data in the DataSet table's row after calling EndEdit(), the date field is updated with the data from the form, the string is not.
Oddly enough, when I edit an existing row with the same form (without calling AddNew), the string field is updated and persisted just fine. So this only happens after calling AddNew() on the BindingSource. What am I missing? Where should I start looking?
The code is a bit too much to post here, unfortunately.