add DataTable to existing Table

M

Mark Broadbent

my brain has short-circuited. I am trying to add a DataTable to an existing
DataTable (of same schema i.e. no columns etc). Cannot find an add method of
datatable and the rows add method has no overload for multiple rows.

Any ideas?

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
 
D

Dmitriy Lapshin [C# / .NET MVP]

Mark,

Seems such a method is really missing (BTW a good idea to add it in .NET
2.x!). Still, you can import rows one by one with the ImportRow method. I
think what such an overload would do anyway is iterating on the target
DataTable's Rows collection and importing them one after another - just
probably in a more optimized manner.
 
M

Mark Broadbent

yeah thats what I thought :(
still iterating through is pretty quick.
Hopefully AppendTable() method will happen.

Thx for input.

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
Dmitriy Lapshin said:
Mark,

Seems such a method is really missing (BTW a good idea to add it in .NET
2.x!). Still, you can import rows one by one with the ImportRow method. I
think what such an overload would do anyway is iterating on the target
DataTable's Rows collection and importing them one after another - just
probably in a more optimized manner.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

Mark Broadbent said:
my brain has short-circuited. I am trying to add a DataTable to an existing
DataTable (of same schema i.e. no columns etc). Cannot find an add
method
of
datatable and the rows add method has no overload for multiple rows.

Any ideas?

--


Br,
Mark Broadbent
mcdba , mcse+i
=============
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top