Solved

Combine 2 datasets.

Posted on 2004-08-18
3
196 Views
Last Modified: 2010-04-15
How do I combine two datasets.
thanks,
Ghost
0
Comment
Question by:copyPasteGhost
3 Comments
 
LVL 9

Assisted Solution

by:s_sansanwal
s_sansanwal earned 100 total points
Comment Utility
Use DataSet Merge method
Refer
http://authors.aspalliance.com/aspxtreme/sys/Data/datasetclassmerge.aspx

Cheers,
S Sansanwal
0
 
LVL 10

Accepted Solution

by:
eternal_21 earned 150 total points
Comment Utility
Here is an example:

  static System.Data.DataSet Combine(params System.Data.DataSet[] dataSets)
  {
    System.Data.DataSet dataSet;
    dataSet = new System.Data.DataSet();
 
    foreach(System.Data.DataSet pDataSet in dataSets)
      dataSet.Merge(pDataSet);
                  
    return dataSet;
  }

You can call it as:

  Combine(dataSet1, dataSet2, ...), and it will return a DataSet that has all the requested DataSets combined.
0
 
LVL 13

Author Comment

by:copyPasteGhost
Comment Utility
thanks
to the both of you
Ghost
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now