Duplicate key was ignored

  • I'm running into an issue after deleting a row from a table. Basically we have a record keeping app that for whatever reason wasn't seeing a newly entered record in the database. So I deleted that record from the database and had the user reflag it to be imported again. The import process ran and the error returned from SQL was:

    Error #40002

    23000: [Microsoft][ODBC SQL Server Driver][SQL Server]Duplicate key was ignored.

    (Source: MicrosoftRDO.RdoQuery)

    I'm not sure if this refrences an index issue? Any help would be appreciated.

  • Are you sure that only one table is affected by the records generated by the app?

    There may be other tables which have inserts or updates being run against them and the duplicate may be outwith the table you deleted on.

    Have you tried running profiler to see what exactly the query is doing when the transaction is run from the app?

    Probably worth checking to start with...

  • Thank you for the reply, I'm unexperieced with profiler. But after your comment I began to comb through the tables looking for a duplicate and was able to locate one that refrenced the same record, deleted it and after rerunning the process the inserts the data all is well.

    Thanks for your help.

  • No problem, glad you got it sorted 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply