We used the VS2010 data connection design wizard to define a connection to a SQLCe database with just one table (database="UserMetrics" table="User"). Try as we might the update doesn't seem to hold, I've been through posts on SO and MSDN but can't see the glaring error...
//initialize
UserMetricsDataSet umDataSet = new UserMetricsDataSet( );
UserMetricsDataSetTableAdapters.UserTableAdapter umTableAdapter = new UserMetricsDataSetTableAdapters.UserTableAdapter( );
// check that test data is there and count is correct
umTableAdapter.Fill( umDataSet.User );
UserMetricsDataSet.UserRow umRow = (UserMetricsDataSet.UserRow)umds.User.Rows[0];
int count = umDataSet.User.Rows.Count; //yep its there
//lets add some rows
for (int i = 0; i < 100; i++)
umDataSet.User.AddUserRow( "smith", (float)54, (float)3, 1);
umds.User.AcceptChanges( );
//umTableAdapter.Update(umDataSet.User); //tried this also ... no change...
// there are now 101 rows !!
int count = umDataSet.User.Rows.Count; //yep its there
umRow = (UserMetricsDataSet.UserRow)umds.User.Rows[101];
//lets double check
umTableAdapter.Fill( umDataSet.User );
int count = umds.UserMetris.Rows.Count; //huh!!! count==1 ???