populate datatable from multiple data sources?

C

ColdCanuck

Greetings All!

I'm fairly new to .NET so please excuse me if this is a stupid question. I'm
about 1/4 the way through Rebecca Riordan's excellent ADO.NET Step by Step
book. I have also been reading the newsgroups and surfing various sites but
haven't found an answer.

Is it possible to populate a datatable within a dataset with data from
various data sources? I'm thinking that each tuple could consist of data
from different data sources. For example:

local datatable PK db PK col1 col2 .........
coln
oracle 1 120 abc 12
12/11/03
2 121 def 4
12/10/03
sybase 3 21 xy 90
12/10/03
4 28 yy 91
12/11/03
sql server 5 2 nxn 222
12/9/03
6 5 nyn 154
12/10/03
access 7 123 asx 56
12/8/03
8 127 asd 99
12/10/03
excel 5 99 aaa 12
12/11/03
..
..
..
etc.

The local datatable would have its own PK, a PK that maps to the table/db
from where it comes from (i.e.: Oracle, Sybase MSSQL, etc.) and then various
columns. (as long as you use data types that are supported by all data
sources). I'm thinking that a relationship would keep track of where each
row belongs? Is this scenario possible in .NET?

Your thoughts/ideas/comments/suggestions are most welcome!

cheers,
Norm
 
M

Miha Markic

Hi Cold,

Yup, just call update several times. It will update the rows (it a row with
pk already exists or add a new one otherwise).
Just make sure that all tables have the same pk column (otherwise you'll
have to map them for each update).
 

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