Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

How can I create a dataset table with data from 2 different data source?

Hi, I'm using vs2005 .net 2.0.  I need to create a dataset table with some columns of data from one data source and some other columns of data from another data source.  These 2 data source have the same primary keys and that's how that can relate to each other in creating this new table.  

I need to create this table so I can then make a query into this dataset table.  Are there any one line sample code on how I can do this?  Thanks.
Avatar of BogdyPtr
BogdyPtr

If your data is in the same database than you can use a select on both tables to combine data in a DataTable.
This method will work if you have multiple databases on a DBMS that supports queryes on multiple databases.
If this is not the case than I see no other solution but to select in two different DataTables and write code to combine them.
ASKER CERTIFIED SOLUTION
Avatar of CBeach1980
CBeach1980

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

Hi CBeach,

My data source are not straight forward database source.  Your sample is exactly what I'm looking for.  I haven't had a change to do it (coding some other part).  I'll let you know as soon as I can do it in a day or 2 .  Thanks.