473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

add DataTable to existing Table

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
=============
Nov 16 '05 #1
2 9023
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" <no************@no-spam-please.com> wrote in message
news:uF****************@TK2MSFTNGP10.phx.gbl...
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
=============


Nov 16 '05 #2
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 [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uG*************@TK2MSFTNGP09.phx.gbl...
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" <no************@no-spam-please.com> wrote in message
news:uF****************@TK2MSFTNGP10.phx.gbl...
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
=============

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brian Bischof | last post by:
I'm using a third-party tool that takes a DataTable as a parameter. I really need to pass it a DataView instead. When I try to explicitly cast the DataView as a DataTable I get an error that they...
1
by: VMI | last post by:
I have a filled datatable and I need to copy this data into an Access table with exactly the same table structure. Can I do this without having to run an Insert query for every line of the...
1
by: andrewcw | last post by:
I have just 1 table that I am updating, the SQL I use to generate the DataTable is complex using multiple tables, however when I view the fieldnames of the DataTable from the DataSet - everything...
6
by: ronchese | last post by:
Hi. I'm trying to make a criteria string to use in Select() method of a datatable, searching for a date, but it is apparently not working! In one of my tests, I have a datatable with 1 row and...
2
by: neilr | last post by:
Can anyone help with some problkems that have wasted 2 days of my (inexperienced) time already? We have a website which allows people to register for events like conferences We are importing...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, In my vb2005 app I create 3 datatables in the Datasource area, tbl1, tbl2, tbl3. tbl1 contains 1 column, tbl2 contains 2 columns tbl3 contains 3 columns. Based on selections from a...
2
by: Mr. Arnold | last post by:
I am working a C# project that uses what's in the subject. I kind of have the basics down on reading the table data. I don't use the above methods of data access or persistence, but I am stuck...
2
by: Ryan Liu | last post by:
Hi, If I have a very big view in database, it covers 15 tables, each table has 1000 columns. When I issue select * from view, the database will give error -- too many columns. Can I use a...
9
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got a routine that builds a table using different queries, different SQL Tables, and adding custom fields. It takes a while to run (20 - 45 seconds) so I wrote a thread to handle the table...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.