Home Forums SQL Server 2005 T-SQL (SS2K5) cannot insert duplicate key row in object 'tablename' with unique index 'indexname' RE: cannot insert duplicate key row in object 'tablename' with unique index 'indexname'

  • Chris Morris (4/15/2009)


    What's the name of the primary key column?

    How are new values for the PK generated?

    The Access application may be attempting to change the value in the PK column on the row which is currently being updated - is this intentional?

    What are you doing in Dev which doesn't cause a problem - is it an update statement, a stored procedure? Does it attempt to update the PK also?

    Thanks for your reply Chris.

    I am sorry to bother you. The problem is fixed now. There is a duplicate data for that column where user is trying change it. Yes, it is a key column of composite primary key. and also it is unique non clustered index.

    Unfortunately, I didn't get his duplicate when I checked that's why I kept it in forum for your help. I would have given the number wrongly while checking.

    Any way, thanks for your help. I am really sorry for this.

    Thank You