Solved

Union from Oracle and Access 97

Posted on 2000-03-21
8
267 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:BBrian
8 Comments
 

Expert Comment

by:pinshah
Comment Utility
Union Query dnt bother abt the datatypes i suppose. only the fields number should be same.
0
 

Author Comment

by:BBrian
Comment Utility
Even if the queries are derived from different drivers?

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

Ya reckon?  
0
 
LVL 4

Expert Comment

by:gcs001
Comment Utility
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.
0
 
LVL 1

Expert Comment

by:phiro
Comment Utility
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.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:BBrian
Comment Utility
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?
0
 
LVL 1

Accepted Solution

by:
phiro earned 100 total points
Comment Utility
Yes.
Just reference both libraries from the references menu
0
 

Author Comment

by:BBrian
Comment Utility
Sorry it took me so long to grade the answer.

Thanks for your help!
0
 
LVL 1

Expert Comment

by:phiro
Comment Utility
you're welcome!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now