Adding DataTable with columns to dataset
For the ff example, creating 1 datatable, 3 columns then adding a row to the table
Dim mDS As New DataSet
Dim mDT As New DataTable
'Adding table to dataset
mDS.Tables.Add(mDT)
[...]
For the ff example, creating 1 datatable, 3 columns then adding a row to the table
Dim mDS As New DataSet
Dim mDT As New DataTable
'Adding table to dataset
mDS.Tables.Add(mDT)
[...]
You can add multiple relations to a dataset.
Ex
Parenttable
ParentID1
ParentID2
……
ChildTable
ChildID1
ChildID2
…..
mDS1.Relations.Add("relationname", New DataColumn()_
{mDS1.Tables("ParentTable").Columns("ParentID1"), _
mDS1.Tables("ParentTable").Columns("ParentID2")}, _
New DataColumn() {mDS1.Tables("ChildTable").Columns("ChildID1"), _
mDS1.Tables("ChildTable").Columns("ChildID2")}, False)