Data Adapter Updates not happening

I have an Infragistics grid bound to a BindingSource, that in turn is bound to a strongly typed dataset.  I want to add a row to the grid, then when the user click the OK button, save the new row back to the SQL Express database I am using.

In the OK button, I have this code:



this.productFeatureBrowserDataSet.Versions.AcceptChanges();
this.versionsTableAdapter.Update(
    this.productFeatureBrowserDataSet.Versions
);

 


When I click the button, the code runs, but the new grid row never gets added to the Database table.  If I break on the Update command, I can see that the Versions table does in fact contain the new row, but its just not getting saved to the database, and I do not know how to set up a SQL Profile to see if the SQL is actually firing on the SQL server to save the record.

Help is appreciated

Devin



Answer this question

Data Adapter Updates not happening

  • Ged325

    Are you run this in VS2005 IDE

    Not sure if this is your case:

    If you create a datasource using the access database: in the project, you will see that there is a mdb file included. Check the "Copy to output directory" property of the file. If  this property is set to "Always copy" then every time you run the app from IDE, you will see the database is reset.

  • Motzl

    This seems pretty dumb that VS does not know to automatically set the property to "Copy if Newer".

    But changing the property worked.

    devin

  • Data Adapter Updates not happening