Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete child records, when parent record is deleted
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00523079
Message ID:
00523120
Views:
9
Nadya,
Do the following:

close database
open database mydatabase exclusive
modify database

The Clean Up option should be available. Unless you explicitly open a database exclusively, it is open shared. You can't clean up a shared database. FYI, you must close the database before opening it exclusively. Unlike tables, VFP does not reopen the database exclusively when you do this. AFAIK, it doesn't do anything because the database is open shared as a result of the command.

>>Nadya,
>>
>>Just set delete to cascade for the relation. Open the database, select Edit Referential Integrity from the Database menu, click on the Rules for Deleting tab, scroll to the Regions and TownRegions relation and set to cascade.
>
>Brien,
>
>I'm trying it, but it gives me an error message: "Database should be cleaned up". But this option is disable in the Database menu. What should I do? I already tried to validate database.
>
>
>>>Hi everyone,
>>>
>>>This is a basic question, but I haven't used triggers before, so here is a problem:
>>>
>>>I have parent and child tables Regions and TownRegions. On the form I use views RegionsInfo and TownsInfo in buffered mode. I want to delete record in RegionsInfo view and this would automatically delete all records in TownsInfo view for this RegionID. Regions and TownRegions tables are part of Stats database, which is VFP database.
>>>
>>>Could you please help me here?
>>>
>>>Thanks in advance.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform