ブレークポイントでチェックしているときにdsに明らかに変更が加えられているにもかかわらず、ds.hasChanges()がfalseになっていることに気付いた人はいますか?私はかなり長い間それを見てきました、そして私は何が悪いのかわかりません...
// 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
HasChangesを使用して行の後にブレークポイントを設定し、DataSet Visualizerを使用すると、DataSetが実際に変更されたことがわかりますが、HasChangesはfalseを返します。
私は明らかなことを見逃していると確信しています...誰かが私が間違っていることを見ることができますか?
乾杯