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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Sql Exception

Sql Exception

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorial
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.
  • S Offline
    S Offline
    Suresh Pirsquare
    wrote on last edited by
    #1

    When i try to insert a record in my webapplication,it is giving the Following Error: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Client'. The conflict occurred in database 'sam', table 'ClientStatus', column 'client_id'. The statement has been terminated. I want to know why it is giving this error and how to resolve this error. Thanks in Advance, Regards, Suresh Dayma

    C M 2 Replies Last reply
    0
    • S Suresh Pirsquare

      When i try to insert a record in my webapplication,it is giving the Following Error: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Client'. The conflict occurred in database 'sam', table 'ClientStatus', column 'client_id'. The statement has been terminated. I want to know why it is giving this error and how to resolve this error. Thanks in Advance, Regards, Suresh Dayma

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Suresh Dayma wrote:

      I want to know why it is giving this error and how to resolve this error.

      Because you have related tables. The insert breaks the relationship in some way. There is other data (probably in a table called Client) that needs to be inserted first.


      Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

      1 Reply Last reply
      0
      • S Suresh Pirsquare

        When i try to insert a record in my webapplication,it is giving the Following Error: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_Client'. The conflict occurred in database 'sam', table 'ClientStatus', column 'client_id'. The statement has been terminated. I want to know why it is giving this error and how to resolve this error. Thanks in Advance, Regards, Suresh Dayma

        M Offline
        M Offline
        MoeInsairat
        wrote on last edited by
        #3

        hey, it's all about the relations in ur DB. for sure u r having a releation between the clientstatus and client_id and the primary key in the client_id doesn't exist in the other table. i mean the value.

        Estarta

        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