Click to See Complete Forum and Search --> : error msg '80040e14' ----Urgent help!!


sunnyk
November 2nd, 2005, 01:14 PM
Hi all---

We are working with Microsoft SQL Server and when we try to insert a record into a table
called 'employee salary', we get the following errormessage:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PK_employee_salary'. Cannot insert duplicate key in object 'employee_salary'.

Do you have any idea what could cause this error.

Thx in advance,

mmetzger
November 2nd, 2005, 01:17 PM
The cause is pretty much exactly what it says. You're violating the Primary Key constraint on that table. Look at the table and see what the primary key is and then make sure your code allows for it to be inserted differently each time.