C# DataSet changes not being persisted to database
I'm populating some controls on a form using data-binding, connecting to a `DataSet` using `TableAdapters` and `BindingSources` (i.e. the standard design-time Visual Studio components). The data is fetched from the database and the fields display the correct values. However, I cannot make changes that persist.

I have a save button, which when clicked executes the following code:

            try
            {
                this.Validate();
                this.myBindingSource.EndEdit();
                this.myTableAdapter.Update(myDataSet.table1);
                // Data should be persisted?
            }
            catch (Exception ex)
            {
                // Something went wrong...
            }

The catch block is never executed (i.e. no errors are being thrown) - unfortunately, the changes aren't saved back to the database and if I close and reopen the form the original (unmodified) data remains.

Is there anything else I need to do to make the changes persistent?
C# DataSet changes not being persisted to database
===

I'm populating some controls on a form using data-binding, connecting to a `DataSet` using `TableAdapters` and `BindingSources` (i.e. the standard design-time Visual Studio components). The data is fetched from the database and the fields display the correct values. However, I cannot make changes that persist.

I have a save button, which when clicked executes the following code:

            try
            {
                this.Validate();
                this.myBindingSource.EndEdit();
                this.myTableAdapter.Update(myDataSet.table1);
                // Data should be persisted?
            }
            catch (Exception ex)
            {
                // Something went wrong...
            }

The catch block is never executed (i.e. no errors are being thrown) - unfortunately, the changes aren't saved back to the database and if I close and reopen the form the original (unmodified) data remains.

Is there anything else I need to do to make the changes persistent?