473,396 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MS Access and DB2 Linked Tables Query

I can pull up an MS Access database, link DB2 tables to it (using a
System DSN) and create queries that return differences between a MS
Access table and a DB2 table. I am able to query both the MS Access
table and the DB2 table at the same time in the same SQL statement.

My problem is I am trying to duplicate this functionality in C# and I
cannot figure it out. The SQL that MS Access builds is:

SELECT DPS_OFFICE_ALIAS.TRADE_FIRM, DPS_OFFICE_ALIAS.TRADE_OFFICE
FROM (DPS_OFFICE_ALIAS LEFT JOIN 0001000_20060424_084844_O ON
(DPS_OFFICE_ALIAS.TRADE_FIRM = [0001000_20060424_084844_O].TRADE_FIRM)
AND (DPS_OFFICE_ALIAS.TRADE_OFFICE =
[0001000_20060424_084844_O].TRADE_OFFICE)) INNER JOIN
DPS_OFFICE_ADDRESS ON DPS_OFFICE_ALIAS.OFFICE_ID =
DPS_OFFICE_ADDRESS.OFFICE_ID
WHERE (((DPS_OFFICE_ALIAS.TRADE_FIRM)="1000") AND
(([0001000_20060424_084844_O].TRADE_FIRM) Is Null) AND
(([0001000_20060424_084844_O].TRADE_OFFICE) Is Null));

The "DPS_OFFICE_ALIAS" is the DB2 table. 0001000_20060424_084844_O is
the access table. This query returns records in the DPS_OFFICE_ALIAS
table that are not in the 0001000_20060424_084844_O table.

I create the MS Access databases in code so the ODBC connection
information to the DB2 tables is not in the database.

I see I have 2 choices;
1. Link the DB2 tables to the current MS Access database. How do I do
this in code?

2. Place the connection information to the DB2 tables in the SQL. How
do I do this in code?

Any help or observations will be greatly appreciated.

Jerry

Apr 26 '06 #1
0 1325

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
3
by: dk | last post by:
Hi all, Would appreciate some advice on the following: I am trying to speed up an Access database connected to a SQL Server back-end. I know I can use a pass-through query to pass the sql...
8
by: Alfonso Esteban Gonzalez Sencion | last post by:
I am trying to use Access as a front end for extracting information from an Oracle database. I started using linked tables but I am getting a very curious behaviour. When I consult the linked...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
4
by: pokerboy801 | last post by:
OK, I will try to explain this as clearly and as concise as possible. I am using Access, which has three MS Excel Linked tables, to store call center metrics for reps. My Excel workbook has three...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.