Advertisement

01.31.2007 at 12:59PM PST, ID: 22144359
[x]
Attachment Details

Need to copy one dataset to a new dataset

Asked by charlesbaldo in .Net Editors & IDEs, C# Programming Language, Microsoft Visual C#.Net

Tags: copy, one

Hello,
I need to copy every row in 1 dataset to a second dataset. The below code segment is pretty much what I need to do

private DataSet  dsGroup(DataSet SourceDS)
            DataSet TargetDS = new DataSet();
            foreach (DataRow row1 in SourceDS.Tables[0].Select("Kounter=1"))
            {
                // Add every row in SourceDS to TargetDS
            }
            return TargetDS;
}

Do I need to define every column in Target or can I copy the whole row with the same datastructure of SourceDS?

Thank You
Chuck
Start Free Trial
[+][-]01.31.2007 at 01:04PM PST, ID: 18439590

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:07PM PST, ID: 18439634

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:08PM PST, ID: 18439640

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:21PM PST, ID: 18439771

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:28PM PST, ID: 18439818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:29PM PST, ID: 18439826

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, C# Programming Language, Microsoft Visual C#.Net
Tags: copy, one
Sign Up Now!
Solution Provided By: DrAske
Participating Experts: 2
Solution Grade: A
 
 
[+][-]01.31.2007 at 01:29PM PST, ID: 18439834

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:32PM PST, ID: 18439850

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01.31.2007 at 01:36PM PST, ID: 18439896

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:43PM PST, ID: 18439947

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.31.2007 at 01:54PM PST, ID: 18440049

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32