Linked SQL Server tables

G

Guest

Hello,

I have an ACCESS 2000 database which has a mix of tables and linked SQL
Server tables (my client doesn't want to hold both tables in the SQL Server
for any reasons). The primary key of the SQL Server table (Material) is an
uniqueidentifier. The responding foreign key of the ACCESS table (Chapter) is
an replication id (hope this is the right word in english). Now I will call a
query with an INNER JOIN of the two tables, but the result is always empty. I
tried queries, vba and vb (ado and dao) code and c# (ado.net), but it's
always the same result.

I hope some of you can help me.

Stephan
 
G

Guest

Hello Wart,

here is the query:

SELECT Material.* FROM Material
INNER JOIN Chapter ON Material.IdMaterial = Chapter.IdMaterial;

Material = SQL Server table. IdMaterial is an uniqueidentifier.
Chapter = Access 2000 table. IdMaterial is a Replication ID.

Stephan
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What you really need to do is check both tables to see if you have the
same values in both tables. E.g., if table Material has IdMaterial
value 35, is there a corresponding value 35 in table Chapter.IdMaterial?

I'm assuming you're using linked SQL tables & running the query in
Access.

Not sure you can use Replication IDs columns in Access that link to
SQL'r tables. The values are created in different environments & would
not be common to either db. If the values are created in one
environment & copied to the other environment in APPEND queries - that
would probably work.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQf/ta4echKqOuFEgEQLfEwCfVtQqokCnYMbjbLWuXQ7X2Qai9gcAoOMp
PcOmmm68kqgOd5NrZT5LmpNN
=+HkA
-----END PGP SIGNATURE-----
 
G

Guest

The values in both tables are the same. When I import the Material table into
the ACCESS database the query works. However, I will try to convince my
client to hold all tables in the SQL Server.

Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top