Link to home
Start Free TrialLog in
Avatar of BBrian
BBrian

asked on

Union from Oracle and Access 97

I have a query from an access database
and an oracle database.  I need a union query so I can output the file to a crystal report.  Suppose the data types from oracle and Access 97 do not match.
What is the best strategy here?
Avatar of pinshah
pinshah

Union Query dnt bother abt the datatypes i suppose. only the fields number should be same.
Avatar of BBrian

ASKER

Even if the queries are derived from different drivers?

Or maybe this should be a recordset created through an Oracle stored procedure...

Ya reckon?  
You may have to write your own UNION type code in VB as I don't think you can get one recordset back from 2 different databases as you will have different connections to the different databases.

I would advise you to get your 2 recordsets via VB code and then programmatically do a UNION on these 2 recordsets within the VB program.

Regards,
Grant.
Best would be to run the query on one database...
Copy your Access records into Oracle tables and run the union on the Oracle database.
Or the other way around, whichever has the best performance.
Another option is to use an ADO recordset, load this with the records of the two databases (You can change the database connection at runtime) and you have the rows you want in one recordset. After that you can do your union stuff.
Avatar of BBrian

ASKER

One of the tables in the access database
is a dbf file.  using ado, I cannot access the linked data.  However, I can use dao to see the linked data.  Is it possible to reference ado and dao in the same project?
ASKER CERTIFIED SOLUTION
Avatar of phiro
phiro

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 BBrian

ASKER

Sorry it took me so long to grade the answer.

Thanks for your help!
you're welcome!