Results 1 to 3 of 3
  1. #1
    peccy is offline Member
    Join Date
    Dec 2012
    Posts
    4
    Rep Power
    0

    Default Cant delete data in sql database

    Cannot delete or update a parent row ; a foreign key constraint fails


    is there some kind of option i need to disable?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default Re: Cant delete data in sql database

    Moved from Advanced Java, although this appears to be a database rather than a JDBC question.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,172
    Rep Power
    20

    Default Re: Cant delete data in sql database

    No, what you need to do is sort out your database.
    If deleting violates a foreign key, then the usual solution is to delete the dependent rows as well, since they are now no longer valid.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. create,edit ,delete in JSP usin struts and SQL server as database in jdeveloper
    By gurpreet.singh in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-11-2011, 01:43 PM
  2. Delete and edit data in xml file using JSP
    By gurpreet.singh in forum JavaServer Pages (JSP) and JSTL
    Replies: 6
    Last Post: 03-10-2011, 09:07 AM
  3. Replies: 15
    Last Post: 11-13-2009, 12:00 PM
  4. Not able to delete MSSql database table entries
    By wickedrahul9 in forum Advanced Java
    Replies: 3
    Last Post: 10-17-2008, 01:14 PM
  5. How to Modify,Delete data in File Txt???
    By hungleon88 in forum Advanced Java
    Replies: 9
    Last Post: 09-24-2008, 04:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •