If I have a table <Personnel> and it is related to <table1>, <table2>, and <table3>. Can I have Cascade Delete with <table2> only, or will it affect <table1> and <table3> as well?
Adam Schwanz
@Reply 3 years ago
Do table 1 and table 3 have referential integrity on?
Michael OlsenOP
@Reply 3 years ago
Yes
Adam Schwanz
@Reply 3 years ago
You won't be able to delete records if there is a joined record in the other tables then.
Michael OlsenOP
@Reply 3 years ago
So a cascade delete in a single relationship affects all networked relationship with referential integrity. Not just the two tables in the immediate relationship?
Adam Schwanz
@Reply 3 years ago
If referential integrity is on, you won't be able to delete a record from Personnel if there is a related record in any of the tables that have a relationship with it with referential integrity. You'd have to delete the records from Table1,2, and 3, and then delete the record in Personnel. If you try to delete a record in Personnel you should get an error about related records existing in another table. If there is no joined record in table 1 and table 3, the delete will probably work with just table 2.
Scott Axton
@Reply 3 years ago
Cascade deletes are very dangerous IMHO. I NEVER use them and only delete sparingly and very intentionally.
Before you get too far down the road you might want to check out the Don't Delete Data video.
In conjunction with that how to Archive Records when you need that space back.
In addition, they won't work in a split database when and if your db becomes large enough.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 2.