Violation of PRIMARY KEY constraint 'PK_MemoBatchSettings'. Cannot insert duplicate key in object 'dbo.MemoBatchSettings'.

Locked Violation of PRIMARY KEY constraint 'PK_MemoBatchSettings'. Cannot insert duplicate key in object 'dbo.MemoBatchSettings'.

  • Donnerstag, 28. Juni 2012 08:54
     
     
    Violation of PRIMARY KEY constraint 'PK_MemoBatchSettings'. Cannot insert duplicate key in object 'dbo.MemoBatchSettings'.

    --Himanshu Kulkarni, Mark the thread as answered if the answer helps you. This helps others who have the same problem !!!

Alle Antworten

  • Freitag, 29. Juni 2012 08:19
    Moderator
     
     Beantwortet

    Hi,

    The error message indicates that it violate the primary key constraint. If you do want to allow insert duplicated data, you'll need to change the design of the table. Otherwise, you need to check the data source, make sure there is no duplicated key. For more information about primary key  constraints, please refer to:

    PRIMARY KEY Constraints

    http://msdn.microsoft.com/en-us/library/ms191236(v=SQL.105).aspx

    Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.