W
Wayne Godfrey
I have a database application developed in VS 2003 that uses a dataset (ds)
containing three tables: one parent (dt1) and two child tables (dt2 & dt3).
In code I clone the two child datatables (dt2Clone & dt3Clone), make updates
to the clones, and then merge those back into the original dataset using the
following syntax:
ds.merge(dt2Clone)
ds.merge(dt3Clone)
After doing this, the original dataset still only has the 3 tables (dt1,
dt2, & dt3) and the child tables contain the merged, updated data.
When I ported this code unchanged over to Visual Studio 2005 Beta 2 it
broke.
What I found was that the merge statements mentioned above resulted not in
the data from the clone tables being merged with the original tables but
instead two additional tables were created in the dataset WITH THE SAME
NAMES. So I had dt1, dt2, dt3, dt2, and dt3.
Later, when I tried to reference dt2, I received an exception from within
the dataset's designer generated code that stated the name dt2 (or dt3) was
in the collection twice with different namespaces.
I changed the merge statements to use the datatable merge instead of the
dataset merge and it worked correctly.
ds.dt2.merge(dt2Clone)
ds.dt3.merge(dt3Clone)
Is this an intended change in the way the dataset merge works?
containing three tables: one parent (dt1) and two child tables (dt2 & dt3).
In code I clone the two child datatables (dt2Clone & dt3Clone), make updates
to the clones, and then merge those back into the original dataset using the
following syntax:
ds.merge(dt2Clone)
ds.merge(dt3Clone)
After doing this, the original dataset still only has the 3 tables (dt1,
dt2, & dt3) and the child tables contain the merged, updated data.
When I ported this code unchanged over to Visual Studio 2005 Beta 2 it
broke.
What I found was that the merge statements mentioned above resulted not in
the data from the clone tables being merged with the original tables but
instead two additional tables were created in the dataset WITH THE SAME
NAMES. So I had dt1, dt2, dt3, dt2, and dt3.
Later, when I tried to reference dt2, I received an exception from within
the dataset's designer generated code that stated the name dt2 (or dt3) was
in the collection twice with different namespaces.
I changed the merge statements to use the datatable merge instead of the
dataset merge and it worked correctly.
ds.dt2.merge(dt2Clone)
ds.dt3.merge(dt3Clone)
Is this an intended change in the way the dataset merge works?