Does anyone encounter ds.hasChanges () as false, even though ds obviously has a change while you check it at a breakpoint? I looked at him for a long time, and I do not see what is wrong ...
// connectionstring and command has been set
DataSet ds = new DataSet();
BindingSource myBindingSource = new BindingSource();
SqlDataAdapter dataAdapter1 = new SqlDataAdapter();
dataAdapter1.Fill(ds, "Data");
myBindingSource.DataSource = ds.Tables["Data"];
// then changes made to the datatable on a windows form using bindingnavigator
ds.HasChanges(DataRowState.Modified); // is false
Now, when I set a breakpoint after a line with HasChanges and use the Dataizer Visualizer, I see that the DataSet has actually changed, but HasChanges still returns false.
I'm sure I am missing the obvious ... can anyone see what I'm doing wrong?
Greetings
source
share