Forums

This topic is locked

Cannot insert duplicate key row?

Posted 20 May 2002 16:50:19
1
has voted
20 May 2002 16:50:19 No more Newsletters posted:
I'm trying to insert a new record to a SQL database, and I get this error:
Cannot insert duplicate key row in object 'CONTACT' with unique index 'XAK1CONTACT'.

Any ideas?

Replies

Replied 20 May 2002 21:44:13
20 May 2002 21:44:13 Kent Steelman replied:
Your database is telling you is, here is one record in your database that exists in that field with the same data. This field is either a primary key or you have the "No Duplicates" set on the field in the table. Look in your table and look at the field in question, is it a primay key field or do you have the "No Duplicates" setting on for that field. If duplication is not a problem, then either remove the "Primary Key" or turn off the "No Duplicate" criteria. Else you need to check your code to see why the information that is being written to the database is repeating itself.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm trying to insert a new record to a SQL database, and I get this error:
Cannot insert duplicate key row in object 'CONTACT' with unique index 'XAK1CONTACT'.

Any ideas?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Wm. Kent Steelman
Replied 06 Jun 2008 19:39:28
06 Jun 2008 19:39:28 SAMI SAMSAM replied:
HI
I insert a rows in to table and I'm trying to insert new rows to my table by to other query sql, but I get this error:
Cannot insert duplicate key row in object 'Mytable' with unique index 'Mytable'

Help me please,

Reply to this topic