Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked tables with multiple keys

Status
Not open for further replies.

girky

Programmer
Oct 24, 2002
72
US
Hello
I have table on the sql server that has 5 primary keys. When I link it in access it only shows 1. This is causing problems with my delete queries b/c I have duplicate values if only 1 field is listed as the key. The 4 other keys are listed as indexed in access. What can I do? Why doesn't access recognize the multiple keys?
 
that has 5 primary keys
Really ?
I guess you mean a composite PK on 5 fields.
Anyway, to make access happy, you may consider a TimeStamp field in the sql server table.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
what do you mean by this:

has 5 primary keys

Do you mean it has a composite PK made up of the 5 fields?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
sorry! Yes, a composite key that's using 5 fields. And I can not modify the table on the sql server in any way to fix this problem.
 
btw the error i get when i run my delete query is "Single-row update/delete affected more than one row of a linked table. Unique index contains duplicate values."

So how can i get access to reflect the composite key in this linked table to be able to run the delete query?
 
Hi,

Sounds like you have added an index for one (or all) of the fields that make up the composite key, and selected 'Yes no duplicates'.
In your case, it sounds like you need to allow duplicates, so select 'Yes, Duplicates ok'.

ATB

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top