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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Violation of PRIMARY KEY constraint

Status
Not open for further replies.

dangerman2k

Programmer
Jul 19, 2001
6
GB
Hi. We're having a major prob this morning. We're getting the following message on a number of different databases when trying to insert records:

Violation of PRIMARY KEY constraint 'PK__Results__res_id__23494814': Attempt to insert duplicate key in object 'Results'.
dbErrNo = 80040E14
dbNativeErr = 2627
dbSqlState = 23000
Clearing Errors, Rolling back and closing connection

Clearly SQL (6.5) is having a problem when adding rows to the table but the Primary Key contraint is constraining the Identity field which I'm not specifying in the INSERT statement.

Any ideas?
Thanks in advance
Dan
 
thanks, seems to fix the problem.
Any idea what causes this? it's happened on a lot of tables today!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top