SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : Microsoft .NET :

Previous DiscussionNext Discussion
 1 datatable from 2?

Ok, here's what I have.

I have some data in two DataTables.

Let's say that MyDataTable1 has the following:

ID, FK_ID, Field1, Field2, Field3.

And Let's say that MyDataTable2 has the following:

FK_ID, Field4, Field5.

Well, what I want to do is to essentially take these two DataTables, with 1 common field (FK_ID), and "merge" them together.

I can create a DataSet with a relation, but I don't think that will do what I want.

I know I could probably create a relation, then iterate through the DataSet with the relation in it, and create a "master" DataTable that way, but I would rather not do it this way, as I want to make as few changes as possible if changes are to be made in the future.

This is a re-write, and I want to do it soundly.

Started By Monte on Nov 20, 2009 at 7:28:47 AM

3 Response(s) | Reply

Earlier Replies | Replies 2 to 3 of 3 | Later Replies
bod1467 on Nov 23, 2009 at 7:32:59 AM (# 2)

Is the data table to be persistent, or is it purely for display purposes? If the latter then it sounds like a SQL JOIN is what you're after.

/spot who has very little .NET experience. ;-)


Monte on Nov 23, 2009 at 6:35:01 PM (# 3)

I'd use a SQL Join...but the data is from two different databases...it's a long story.


Earlier Replies | Replies 2 to 3 of 3 | Later Replies

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.