Join Oracle and MS SQL tables

  • Thread starter Thread starter Mateusz [PEYN] Adamus
  • Start date Start date
M

Mateusz [PEYN] Adamus

Hi all!

Is it possible to join for example Oracle and MS SQL tables in one
dataSet and show it in one dataGrid?


I'm writing in C# and using standard ADO components that come with .NET
platform.


I can put Oracle data into one table in dataSet and MS SQL data into
another table in the same dataSet but I don't know how to join them so I
could show them in one dataGrid (currently I'm showing them in two
different dataGrids which is a bit unhandy)


best regards
Mateusz [PEYN] Adamus
 
What I've generally done is copying the datatables from the Oracle
DataSet into the SQL DataSet (or vice versa) and adding DataRelations
from there. I don't know of a way you could use a DataRelation between
two datasets.

Clint
 
Clint ([email protected]) napisaÅ‚(a):
What I've generally done is copying the datatables from the Oracle
DataSet into the SQL DataSet (or vice versa) and adding DataRelations
from there. I don't know of a way you could use a DataRelation between
two datasets.

Hi

No no. I don't want to create a relation between to DataSets. I have one
DataSet in which I have to tables - one with data from Oracle'a
(table1) and in the second table (table2) I have data from MS SQL. In
this DataSet I create ralation that between these two tables (table1 and
table2).

And it works just fine. When I try to enter some data to table1 DataSet
checks raltions and shows message if there is an error.

But now I have a problem with showing this data. For example:
select table1.city, table2.region from table1, table2 where
table2.regionid = table1.regionid


I don't know how to make such a query on this data set. I can't make it
on database 'couse data is stored in two different datatabse systems
(Oracle and MS SQL).

best regards
Mateusz [PEYN] Adamus
 
Mateusz said:
No no. I don't want to create a relation between to DataSets. I have one
DataSet in which I have to tables - one with data from Oracle'a
(table1) and in the second table (table2) I have data from MS SQL. In
this DataSet I create ralation that between these two tables (table1 and
table2).

And it works just fine. When I try to enter some data to table1 DataSet
checks raltions and shows message if there is an error.

But now I have a problem with showing this data. For example:
select table1.city, table2.region from table1, table2 where
table2.regionid = table1.regionid

Oh - OK, I think I get what you're trying to do. I'm probably wrong,
but I think you might already have the work done for you. If you set up
your datagrid to have columns with keys City and Region, it should pull
from the respective tables and join automatically. Now, I've only done
this with hierarchical grids, so I'm not sure if thats true or not.
I don't know how to make such a query on this data set. I can't make it
on database 'couse data is stored in two different datatabse systems
(Oracle and MS SQL).

Well, technically you can with linked servers ... we're being forced to
do that here with some a number of Crystal Reports. Needless to say, I
wouldn't suggest it :)
 
You might also want to check out this web-site that promises to provide a
..NET component to allow full SQL syntax queries against a DataSet.

http://queryadataset.com

Hope this helps
Ad.


Mateusz [PEYN] Adamus said:
Clint ([email protected]) napisaÅ‚(a):
What I've generally done is copying the datatables from the Oracle
DataSet into the SQL DataSet (or vice versa) and adding DataRelations
from there. I don't know of a way you could use a DataRelation between
two datasets.

Hi

No no. I don't want to create a relation between to DataSets. I have one
DataSet in which I have to tables - one with data from Oracle'a
(table1) and in the second table (table2) I have data from MS SQL. In
this DataSet I create ralation that between these two tables (table1 and
table2).

And it works just fine. When I try to enter some data to table1 DataSet
checks raltions and shows message if there is an error.

But now I have a problem with showing this data. For example:
select table1.city, table2.region from table1, table2 where
table2.regionid = table1.regionid


I don't know how to make such a query on this data set. I can't make it
on database 'couse data is stored in two different datatabse systems
(Oracle and MS SQL).

best regards
Mateusz [PEYN] Adamus
 
Back
Top