How can I execute a query/datareader connecting to Pervasive SQL2000i Database table and a Paradox t

  • Thread starter Thread starter Dan V.
  • Start date Start date
D

Dan V.

What is the best way to execute a query/datareader that must connect to a
Pervasive SQL2000i database (OleDb works) and a Paradox table (OleDb works)
? The connection strings I see have one database listed typically. I have
successfully connected to both using OleDb...
 
I would like to use a SQL statement to populate one query/DataReader and get
information from 2 different Databases. i.e. to end up with a 2 column
query/table that I can iterate through. The OleDbConnection seems to only
accept one Provider in the connection string...
 
I've got to be misunderstanding you. DB1 is say a Pervsive SQL Db. Db2 is
a Paradox db. In someTable in Db1 you have a field column1. In Db2 you
have anotherTable with column2. You want one SQL Statement that will give
you the results of both colum1 and column2?

The best thing I cna think of is if both of the primary keys are the same
you can fill two datasets and then merge them. No way to do this with a
DataReader b/c it can only have one connection at a time and it needs to
have an open and available connection to work. These two goals don't play
well togehter. If I understand the objective (I get confused easily
though ) then I think you'll need to use datasets and merge them.. but for
this to work the way you want you need those key values in both tables

--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
 
I used to be able to do a heterogeneous join no problem in Delphi with the
BDE or Paradox connecting two different databases in one query result set.
Yes there is a common valued integer field in both, but they are not primary
keys though.

Try looking up "heterogenous" in MSDN Library and you don't have any luck.
(That's because of a spelling mistake. I did find a few entries curious
enough) ""heterogeneous" worked much better.

It is too bad that you have to mess around so much, the data I need can be
disconnected. I only need to query once initially. Filling two datasets
then merging the two?... Wow! I guess that is easier then messing with XML
Web Services...
 
Back
Top