locked
When Enforce Referential Integrity is checked RRS feed

  • Question

  • User-706647060 posted

    Hi ! I have checked Enforce Referential Integrity in my relationship section in my access database.

    By this way Can I delete child records when I delete the perent record?

    Wednesday, May 19, 2010 8:26 AM

Answers

  • User-1360095595 posted

    Assuming I understood you correctly, yes.  Hopefully my previous response answers your question though. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 8:59 AM
  • User-1199946673 posted

    So when I checked 'Cascade Delete Related Fields', I will be able to do what I wanted to do?
     

     

    Yes, but the easiest way to find out was to do a simple test. Try to delete a record in the 'parant' table with and without the Cascade Delete checkbox....

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 9:25 AM
  • User-1199946673 posted

    I have tried it and it worked all perfect but will it work when I do the deleting programatically?
     

     

    Yes, but you could have find that out yourself also by simply testing this Wink

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 11:16 AM

All replies

  • User-1360095595 posted

    I think referential integrity will stop you from entering a non-existing parent id in the child table.  Or stop you from deleting a parent record which has macthing children records; however the cascade delete option will change this behavior to allow you to delete parent records, because now all child records will also be deleted, automatically.

    Wednesday, May 19, 2010 8:36 AM
  • User-706647060 posted

    So when I checked 'Cascade Delete Related Fields', I will be able to do what I wanted to do?


    Wednesday, May 19, 2010 8:57 AM
  • User-1360095595 posted

    Assuming I understood you correctly, yes.  Hopefully my previous response answers your question though. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 8:59 AM
  • User-1199946673 posted

    So when I checked 'Cascade Delete Related Fields', I will be able to do what I wanted to do?
     

     

    Yes, but the easiest way to find out was to do a simple test. Try to delete a record in the 'parant' table with and without the Cascade Delete checkbox....

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 9:25 AM
  • User-706647060 posted

    So when I checked 'Cascade Delete Related Fields', I will be able to do what I wanted to do?
     


    Yes, but the easiest way to find out was to do a simple test. Try to delete a record in the 'parant' table with and without the Cascade Delete checkbox....

    Hi hans ! nice to see your replies :) I have tried it and it worked all perfect but will it work when I do the deleting programatically?

    Wednesday, May 19, 2010 10:26 AM
  • User-1199946673 posted

    I have tried it and it worked all perfect but will it work when I do the deleting programatically?
     

     

    Yes, but you could have find that out yourself also by simply testing this Wink

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 19, 2010 11:16 AM
  • User-706647060 posted

    thanks hans ! I gues I am a lazy human-being Laughing


    Wednesday, May 19, 2010 11:40 AM