Solved

Combine 2 datasets.

Posted on 2004-08-18
3
202 Views
Last Modified: 2010-04-15
How do I combine two datasets.
thanks,
Ghost
0
Comment
Question by:copyPasteGhost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Assisted Solution

by:s_sansanwal
s_sansanwal earned 100 total points
ID: 11837477
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
ID: 11842387
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
ID: 11842956
thanks
to the both of you
Ghost
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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