View Full Version : AccessFE-SQLBE swaps PK for IK


JGT
10-28-2011, 09:35 AM
In my Access(2007) Frontend linked to a SQL Server Backend (2005) application, the SQL Table [SE_MesMatEng] has besides the PK [IdMesMat], a unique indexed column [NumMat].

CONSTRAINT [PK_SE_MatMaq] PRIMARY KEY NONCLUSTERED
( [IdMatMaq] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, FILLFACTOR = 75) ON [PRIMARY]
) ON [PRIMARY]

CREATE UNIQUE NONCLUSTERED INDEX [IK_SE_MesMatEng] ON [dbo].[SE_MesMatEng]
( [NumMat] ASC
)WITH (PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, FILLFACTOR = 75, ONLINE = OFF) ON [PRIMARY]

However, in the Access FE, the primary key of this linked table curiously shows up on the [NumMat] column instead of the [IdMesMat] column, causing troubles when connecting tables in queries.

Any hint for what to do to get this straight?

Thanks in advance.

mdlueck
10-31-2011, 05:50 AM
Have you refreshed the table connection via the Linked Table manager UI? Perhaps you changed the SQL DB schema and have not refreshed the FE DB yet.

JGT
10-31-2011, 07:53 AM
Thanks mdlueck for replying.
Yes I did; to be sure, I killed the link and re-linked the table, however Access made the same arrangement.
When I add new functions to our system, I normally create and check things out in an Access-BE, before creating tables in our SQL Servers. In Access there was no problem at all.