473,385 Members | 1,622 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,385 software developers and data experts.

Appending two data tables

Hi -

I'm looking for a code sample that will let me append a data table to a
second master data table. You can assume that the tables' structures are
identical.

Seems like there should be a method to do this, but I can't find one.

Thanks,
Mark

May 1 '06 #1
2 4830
Mark,

DataTable.Merge

http://msdn2.microsoft.com/en-us/lib...ble.merge.aspx

Be aware that this works conform the constrains of that datatable, therefore
adding will only be if the keys of the new one are really different and
higher than the old one.

I hope this helps,

Cor
"Mark" <Ma**@discussions.microsoft.com> schreef in bericht
news:1D**********************************@microsof t.com...
Hi -

I'm looking for a code sample that will let me append a data table to a
second master data table. You can assume that the tables' structures are
identical.

Seems like there should be a method to do this, but I can't find one.

Thanks,
Mark

May 1 '06 #2
Merge works for .NET Framework 2.0. (I'm running 1.0)

I used the ImportRow method:

For i = 0 to dt.rows.count - 1
dtMain.ImportRow(dt.Rows(i))
next i
Thanks for your comments

"Cor Ligthert [MVP]" wrote:
Mark,

DataTable.Merge

http://msdn2.microsoft.com/en-us/lib...ble.merge.aspx

Be aware that this works conform the constrains of that datatable, therefore
adding will only be if the keys of the new one are really different and
higher than the old one.

I hope this helps,

Cor
"Mark" <Ma**@discussions.microsoft.com> schreef in bericht
news:1D**********************************@microsof t.com...
Hi -

I'm looking for a code sample that will let me append a data table to a
second master data table. You can assume that the tables' structures are
identical.

Seems like there should be a method to do this, but I can't find one.

Thanks,
Mark


May 2 '06 #3

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

Similar topics

2
by: freeagent | last post by:
Help!! I am a complete Access newbie and I have to concatenate about 30 tables into one large table. All these tables have the same column headings as each other. For example, I have TABLE...
1
by: Eli Sidwell | last post by:
I have an Access DB that contains 5 tables for the last 5 years. All 5 tables have the same structure. I wanted to keep each year separate for organizational purposes. But, I want to query all 5...
1
by: mar10 | last post by:
Hi - I have an Access 2000 database. Due to the way that tables flow and the way the user wants to enter data I'm trying to do the following - create a form that is NOT linked to a table. I...
7
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned...
2
by: tony.collings | last post by:
I started a thread here : http://groups.google.co.uk/group/microsoft.public.cmserver.general/browse_thread/thread/29d63077144004a9/c3888efdcb7338f6?hl=en#c3888efdcb7338f6 About creating an Email...
13
by: Shwetabh | last post by:
Hi, I wanted to know if it is possible to do to append two tables into a third table. For example, consider these two tables Table 1...
7
by: Daz | last post by:
Hi everyone! Is it possible to take a line of text like so: <tr><td>title1</td><td>title2</td><td>title3</td><td>title4</td></tr> And append it to a DOM node such as this: var...
3
by: HSXWillH | last post by:
I've looked through the site and not found what I'm looking for here. I am not code-versed or anything like that so my skills are rudimentary at best. I'm using Access 03 on a Windows Vista...
3
by: manojspromantr | last post by:
I'm trying to append some data from one table to another table both the table structure are same. I have an attachments field in both tables but it seems that i cannot append the attachments from one...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.