View Single Post
  #2  
Old March 18th, 2010, 06:35 PM posted to microsoft.public.access.queries
J_Goddard via AccessMonster.com
external usenet poster
 
Posts: 221
Default Action Query (Append) didn't add records due to key violations.

Hi -

We need a bit more detail, but -

You seem to be assuming that the error is caused by field1+field2 duplicates.
Remember that a PK is also "uniquely indexed".

What is the PK in the SQL Server database? Is it an Autoincrement field (I
think it's called that)?
If so, is the append query attempting to add data to that field? (It
shouldn't)

Are there any other indexes that may be causing problems?

John


Nick X wrote:
Hi all,
I am using MS Access 2007 as front-end and SQL Server 2005 as back-end. In
SQL Server I have a PK plus a multi-field index that is unique. I can add
records manually in both Access and SQL, but when I try to run an append
query it throws a key violation error for the records that in field1 are
duplicates but with the addition of field2 in the index are unique. I am
perplexed...

Thanks in advance,
Nick


--
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201003/1