Technote Details :: Adding duplicate values in table

Issue

When I try inserting data into a table, through a MX Kollection generated form, I get an error message saying:

SQL Error: Duplicate entry  'column_name' for key 'key_number'

Duplicate entries on unique columns cause error messages

Reason

This happens because the data you tried to insert into the table is a duplicate of data already existing in the database. Also, the column into which the duplicate value is inserted is set to accept only unique values. Therefore, the insert transaction fails, and the above error message is

Solution

To solve this issue, you can do one of the following:

  1. Remove the unique attribute from the table column that triggered the error.
  2. Only insert unique data into the form fields. This way, there will be no duplicates, and thus no error.

Home > Support > Knowledge Base > Technote Details
Search the Knowledge Base
© Adobe Systems Romania. All rights reserved.