Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

ado.net: best way to concatenate two DataTables


asp.net 1.1

I have two DataTables with identical structures I want to combine, as if
I had used UNION in the select statement. I know I could just loop
through and add rows from one table to the other but that seems like it
might be pretty inefficient. Is there a cleaner way or is looping my
best bet? Thanks!

Matt

"MattB" <somedud@yahoo.com> wrote in message

news:5c617aF2ukoufU1@mid.individual.net...

> I have two DataTables with identical structures I want to combine, as if I
> had used UNION in the select statement. I know I could just loop through
> and add rows from one table to the other but that seems like it might be
> pretty inefficient. Is there a cleaner way or is looping my best bet?
> Thanks!

http://www.google.co.uk/search?sourceid=navclient&aq=t&hl=en-GB&ie=UT...

--
http://www.markrae.net

-----------------------------------------------Reply-----------------------------------------------

MattB schreef:

> asp.net 1.1

> I have two DataTables with identical structures I want to combine, as if
> I had used UNION in the select statement. I know I could just loop
> through and add rows from one table to the other but that seems like it
> might be pretty inefficient. Is there a cleaner way or is looping my
> best bet?

What about using DataSet.Merge?

--
Tim Van Wassenhove - Read my mind <url:http://www.timvw.be/>

-----------------------------------------------Reply-----------------------------------------------

MattB wrote:
> asp.net 1.1

> I have two DataTables with identical structures I want to combine, as if
> I had used UNION in the select statement. I know I could just loop
> through and add rows from one table to the other but that seems like it
> might be pretty inefficient. Is there a cleaner way or is looping my
> best bet? Thanks!

> Matt

Thanks to you both! I actually found a way to do this without having to
combine the tables, so the problem went away.

Matt

-----------------------------------------------Reply-----------------------------------------------

"MattB" <somedud@yahoo.com> wrote in message

news:5c69kcF2v3e32U1@mid.individual.net...

> Thanks to you both! I actually found a way to do this without having to
> combine the tables, so the problem went away.

Are you going to share it with the group...?

--
http://www.markrae.net

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc