This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Dreamweaver » Cannot insert duplicate key row?
Reply

Cannot insert duplicate key row?

No more Newsletters
Member



Since: 18 Apr 2002
Posts: 13
Posted 20 May 2002 16:50:19

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?

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?
Kent Steelman
Wicked Member



Since: 27 Jun 2001
Posts: 155
Replied 20 May 2002 21:44:13
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
SAMI SAMSAM
Member



Since: 06 Jun 2008
Posts: 1
Replied 06 Jun 2008 19:39:28
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

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency