Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Cannot insert duplicate key row in object

Cannot insert duplicate key row in object

Scheduled Pinned Locked Moved C#
databasehelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Ballita
    wrote on last edited by
    #1

    In my current application I am getting an error "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated." while trying to run the command sqlCommand.ExecuteNonQuery(); Please advice me if anyone has any idea on this.

    Thanks & Regards Mishra

    D A 2 Replies Last reply
    0
    • B Ballita

      In my current application I am getting an error "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated." while trying to run the command sqlCommand.ExecuteNonQuery(); Please advice me if anyone has any idea on this.

      Thanks & Regards Mishra

      D Offline
      D Offline
      dealon
      wrote on last edited by
      #2

      Ballita wrote:

      "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated."

      was the key field inserted with the same value? I think the best way for you is to copy the sql statement here, because the error occured in sqlCommand.ExecuteNonQuery();

      If we dream, every thing is possible!

      1 Reply Last reply
      0
      • B Ballita

        In my current application I am getting an error "Cannot insert duplicate key row in object with unique index .\r\n51062\r\nThe statement has been terminated." while trying to run the command sqlCommand.ExecuteNonQuery(); Please advice me if anyone has any idea on this.

        Thanks & Regards Mishra

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        Please do not post the same question to different forums.

        Ballita wrote:

        error "Cannot insert duplicate key row in object with unique index

        if you bother to read what its says it blatently obvious you Cannot insert duplicate key row in object with unique index

        Bob Ashfield Consultants Ltd

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups