Reputation: 105
I am trying to update a specific field in the "Claims" table of my 2010 Access Database. I keep receiving an error message that says there are key violations. Here is the SQL:
UPDATE Claims SET Claims.LS_Name = "JPN" WHERE (((Claims.Responsibility2)=0));
Is there any reason, based on the above code, that it is not working?
Thanks in advance!
Upvotes: 1
Views: 3446
Reputation: 1
OK, I ran into this issue as well in Microsoft Access and think I have ways to solve versions of this. The intermediate table may not be necessary. My experience is that autonumber is the issue so conversion to number seems to work, but you have to delete relationships for Access to allow this change.
OR In certain situations. (for mine the new keys matched the old) something like this (may not be exact steps)
Anyway my next research item is to see how to never use autoincrement and do the unique keys using other methods so relationships do not have to be removed to change from autoincrement to number.
Upvotes: 0
Reputation: 9201
My first guess would be that there is a unique key on Claims.LS_Name and your update hits more than one row.
Upvotes: 1