DataSet merge method

Problem with DatSet merge method in .NET Framework 2.0 Beta2
I have an problem with the DataSet merge method:

Our application middle tier returns an untyped DataSet which I merge into an typed DataSet.
Something that works like:
Dim ds As New DataSet
SqlDataAdapter1.Fill(ds)
DataSet11.Merge(ds)

In .NET framework 1.1 the data is merged into the typed data table with correspondent tablename.
In .NET framework 2.0 Beta2 the merge method adds new DataTables to the DataSet (after merge DataSet has two tables with same tablename)

If this isn't a bug in .NET Framework 2.0 Beta2, what ist the best method to merge data?

Thx, Hansjoerg

[726 byte] By [Hansjoerg] at [2007-12-16]
# 1
Hi,
Are the columns of the source dataset the same as the destination dataset? Try giving a value to the MissingSchemaAction parameter:

DataSet11.Merge(ds, MissingSchemaAction.Add)
cheers,
Paul June A. Domag

PaulDomag at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 2
Hi,

>Try giving a value to the MissingSchemaAction parameter:
doesn't help

>Are the columns of the source dataset the same as the destination dataset
Yes, but merge in framework 2.0 adds new tables and not additional columns!

Further info:
The typed dataset was built by dragging a table from server explorer (includes key column) to the dataset in vs 2003.

Regards
Hansjoerg

Hansjoerg at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...
# 3

Hi,

finally I solved the problem by setting the data table namespace property

ds.Tables(0).Namespace = DataSet11.Namespace

(Not necessary with .NET framework 1.1)

Regards
Hansjoerg Idea

Hansjoerg at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Framework Data Access and Storage...

.NET Development

Site Classified