Combing DataSets

Results 1 to 2 of 2

Thread: Combing DataSets

  1. #1
    Join Date
    Dec 1969

    Default Combing DataSets

    Allright, this will end up as the "Merge" method<BR><BR><BR>but it appears it is not working properly...<BR><BR>I basically have a DataSet like:<BR>[code language="VB.NET"]Dim dsAllResults As NewDataSet[/code]<BR><BR>and what i am doing is hitting 3 different databases, bring back a DataSet that has a few columns, all 3 database hits bring back the same "schema" (same columns)<BR><BR>How can i take those datasets and combine them into one big f-in DataSet to present to the user?<BR>

  2. #2
    Join Date
    Dec 1969

    Default You could certainly do it... adding all the rows of each corresponding table to the one "base" table.<BR><BR>Do each of those DataSet&#039;s have more than one table? If not, why bother with the DataSet, per se? Just use a DataTable.<BR><BR>HAH! Look at this method!<BR><BR ><BR>So something as simple as:<BR><BR>Dim tblRow as DataRow<BR>For Each tblRow In table2.Rows<BR> table1.ImportRow( tblRow )<BR>Next<BR>For Each tblRow In table3.Rows<BR> table1.ImportRow( tblRow )<BR>Next<BR><BR>Yes?<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts