Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can use a view to delete child table records.

Status
Not open for further replies.

nickpatel

Programmer
Jan 5, 2004
41
US
I have about 6 child tables that belong to one parent table. Can I use a view designer to create a view with links to all these tables together and be able to delete records that are linked to parent table? If so once I create the view do I just issue "delete from view where someprimarykey = something". Or is their a better way. I usually delete records one table at a time, but this time I have a lot tables to go through and I've heard there are issues where using view designer with a lot of tables. Any suggestions or comments.

Thanks
Nick
 
Go into your database and set up the relationships you want and let VFP create some RI (referential integrity) code "cascading deletes" for you...then go into the stored procedures of the DBC and look at that code. It will give you a pretty good idea on how it works or you may decide to leave it as is.

boyd.gif

craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
Nick,
For "cleaner" RI code, consider getting a rewritten version at Steve Sawyer's site . Click on "Technical Info and Tools" and then on "Referential Integrity Code".

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top