?
Solved

Combine 2 datasets.

Posted on 2004-08-18
3
Medium Priority
?
203 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 400 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 600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 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