Joining tables across mulitple databases using ADO?

Joining tables across mulitple databases using ADO?

Post by Jacob Hanse » Fri, 21 Jan 2000 04:00:00



How to do?

I have some tables physically placed in 4 different .mdb-databases which I
want to join together using C++ and ADO - is this possible.

Is it possible to link tables using ADO?

Any help appreciated.

Best regards,


 
 
 

Joining tables across mulitple databases using ADO?

Post by Jason Smit » Fri, 21 Jan 2000 04:00:00


You might be able to have one master mdb that just links to the other
databases. I have used ADO to run queries against a mdb that contained no
real data - only linked tables to another database.

Jason


> How to do?

> I have some tables physically placed in 4 different .mdb-databases which I
> want to join together using C++ and ADO - is this possible.

> Is it possible to link tables using ADO?

> Any help appreciated.

> Best regards,




 
 
 

Joining tables across mulitple databases using ADO?

Post by Jacob Hanse » Fri, 21 Jan 2000 04:00:00


Yes, I could do that. The problem, however, is that I need to make the join
dynamically based on which tables the user selects. It would be much nicer
if I was able to specify the tables I want at runtime, perhaps by linking
them to a master db. But linking tables from one .mdb-file to another is not
possible through ADO or?

Jacob


> You might be able to have one master mdb that just links to the other
> databases. I have used ADO to run queries against a mdb that contained no
> real data - only linked tables to another database.

> Jason



> > How to do?

> > I have some tables physically placed in 4 different .mdb-databases which
I
> > want to join together using C++ and ADO - is this possible.

> > Is it possible to link tables using ADO?

> > Any help appreciated.

> > Best regards,



 
 
 

Joining tables across mulitple databases using ADO?

Post by Jason Smit » Sat, 22 Jan 2000 04:00:00


I can't find a simple way to shoot one sql statement with joins over tables
in many databases :-( BUT, you can maybe
create a recordset from each database
step through recordset 1 while seeking or filtering recordset2 (maybe put
the recordsets in arrays first?)

OR, you might be able to create a temp mdb on the fly with linked tables, I
think you can do this with adodx, you might need dao. Then you just have one
mdb to select from. When you are done with the temp mdb, you can delete it.

That doesn't sound very fun though.

Have fun!

Jason

> Yes, I could do that. The problem, however, is that I need to make the
join
> dynamically based on which tables the user selects. It would be much nicer
> if I was able to specify the tables I want at runtime, perhaps by linking
> them to a master db. But linking tables from one .mdb-file to another is
not
> possible through ADO or?

> Jacob



> > You might be able to have one master mdb that just links to the other
> > databases. I have used ADO to run queries against a mdb that contained
no
> > real data - only linked tables to another database.

> > Jason



> > > How to do?

> > > I have some tables physically placed in 4 different .mdb-databases
which
> I
> > > want to join together using C++ and ADO - is this possible.

> > > Is it possible to link tables using ADO?

> > > Any help appreciated.

> > > Best regards,



 
 
 

Joining tables across mulitple databases using ADO?

Post by Jacob Hanse » Sat, 22 Jan 2000 04:00:00


Quote:> OR, you might be able to create a temp mdb on the fly with linked tables,
I
> think you can do this with adodx, you might need dao. Then you just have
one
> mdb to select from. When you are done with the temp mdb, you can delete
it.

> That doesn't sound very fun though.

No, but it would work! This adodx you're talking about, where can I find
info regarding that?

Appreciate your help

Jacob

 
 
 

Joining tables across mulitple databases using ADO?

Post by Uwe Lest » Sat, 22 Jan 2000 04:00:00


Jacob Hansen schrieb:

Quote:

> > OR, you might be able to create a temp mdb on the fly with linked tables,
> I
> > think you can do this with adodx, you might need dao. Then you just have
> one
> > mdb to select from. When you are done with the temp mdb, you can delete
> it.

> > That doesn't sound very fun though.

> No, but it would work! This adodx you're talking about, where can I find
> info regarding that?

Search the MSDN for

        "Microsoft ADOX Programmer's Reference"

But There is a bug : you can't get
the list of all views with ADOX.Catalog
from a SQL-Server on a JetEngine is it OK.

--

Regards

Uwe