U
usernameexists
I've a DataSet with lots of DataTableAdapters which all work fine, but
i'm getting a very strange behavior when merging two unchanged
DataSets:
pseudo code:
MyDataSet ds1 = new MyDataSet();
new MyTableAdapter().Fill(ds1.MyTable);
MyDataSet ds2 = new MyDataSet();
new MyTableAdapter().Fill(ds2.MyTable);
ds1.Merge(ds2, true, MissingSchemaAction.Error) // Need to preserve
changes because there might be some, but not in this test case.
The Select statement isn't anything special either: 'SELECT Column1,
Column2, ... FROM MyTable' and the Database entries are garanted to be
unchanges between queries.
Problem:
After merging those two MyDataSets all rows of MyTable are marked as
changed, but really aren't (i'm absolutly positive about that), so:
DataRowState.Unchanged * DataRowState.Unchanged = DataRowState.Modified
On the other hand modifying one row in ds1.MyTable before merging
results in one changed entry afterwards, which is correct...
I'm disecting this for hours now, but can't find a solution for it.
Funny that nobody else does seem to have such problems, all articles
and forum entries i've found releate to changes NOT reflected within
the DataTable, which works perfectly well in my case...
Does anyone have an idea or suggestions on how this problem came to be?
Thank's in advance!
i'm getting a very strange behavior when merging two unchanged
DataSets:
pseudo code:
MyDataSet ds1 = new MyDataSet();
new MyTableAdapter().Fill(ds1.MyTable);
MyDataSet ds2 = new MyDataSet();
new MyTableAdapter().Fill(ds2.MyTable);
ds1.Merge(ds2, true, MissingSchemaAction.Error) // Need to preserve
changes because there might be some, but not in this test case.
The Select statement isn't anything special either: 'SELECT Column1,
Column2, ... FROM MyTable' and the Database entries are garanted to be
unchanges between queries.
Problem:
After merging those two MyDataSets all rows of MyTable are marked as
changed, but really aren't (i'm absolutly positive about that), so:
DataRowState.Unchanged * DataRowState.Unchanged = DataRowState.Modified
On the other hand modifying one row in ds1.MyTable before merging
results in one changed entry afterwards, which is correct...
I'm disecting this for hours now, but can't find a solution for it.
Funny that nobody else does seem to have such problems, all articles
and forum entries i've found releate to changes NOT reflected within
the DataTable, which works perfectly well in my case...
Does anyone have an idea or suggestions on how this problem came to be?
Thank's in advance!