Deleting record with all its subforms/relationships

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I have a table thats called Hardware (with Workstation name field) and
another table thats called Software (with list of softwares), I have a 3rd
table, Relationship, that is a relationship between these two, so that each
Workstation has several softwares. When I go ahead and delete a certain
Workstation, it does not delete the associated softwares for that
workstation. So when I perform the Delete then in the Relationship I still
have the dangling softwares that are no longer attached to any workstation
(that field becomes blank).

What is the proper way to delete a workstation so that it actually goes and
removes its associated 'subfields' or softwares that are attached to it in
relationship table?

Thanks.
 
Assuming you've created an actual Relationship between the tables, you can
enforce Referential Integrity, and have it Cascade Delete.

Otherwise, you'll have to issue additional DELETE statements when you delete
the one record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top