Bug in dataset.merge???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Well, is this a bug or is it just really late

here is an example

Dim DS1 As New DataSe
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Clic
Dim DS2 As New DataSe
Dim Cdt As New ClassicData.DataTabl
Cdt.TableName = "test
Cdt.Columns.Add(New DataColumn("Hello")
Cdt.IsMasterTable = Tru
DS2.Tables.Add(Cdt

DS1.Merge(DS2

Dim cdt2 As ClassicData.DataTabl
cdt2 = DS1.Tables(0
MsgBox(cdt2.IsMasterTable
End Su

of course classicdata.datatable is a custom version of the datatable, it inherits datatable and all I did was add one property (ismaster)

Now the property is set to true and after the merge it's false

I of course have a much more enhanced datatable and datacolumn and any properites they may have set get set to the default when the merge is done

What's going on here?
 
Hi Joe,

Merge merges just Rows and nothing more.
It will ignore your class' added fields.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Joe said:
Well, is this a bug or is it just really late?

here is an example:

Dim DS1 As New DataSet
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button8.Click
Dim DS2 As New DataSet
Dim Cdt As New ClassicData.DataTable
Cdt.TableName = "test"
Cdt.Columns.Add(New DataColumn("Hello"))
Cdt.IsMasterTable = True
DS2.Tables.Add(Cdt)

DS1.Merge(DS2)

Dim cdt2 As ClassicData.DataTable
cdt2 = DS1.Tables(0)
MsgBox(cdt2.IsMasterTable)
End Sub

of course classicdata.datatable is a custom version of the datatable, it
inherits datatable and all I did was add one property (ismaster).
Now the property is set to true and after the merge it's false.

I of course have a much more enhanced datatable and datacolumn and any
properites they may have set get set to the default when the merge is done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top