Board index » cppbuilder » Cascade delete

Cascade delete


2003-12-15 06:56:51 AM
cppbuilder40
I have a problem, i created few tables with appropriate secondry indexes in
each table.
I placed 3 DBGridbox each pointed to each tables. It is fine when I select
each row from one grid as other grids responds to what the master grid is
slected.
My problem is when i delete a row from master grid i was expecting the 2nd
and 3rd tables which relies on the master table should also be deleted but
it does not.
eg.
WareHouse----
|
Warehouse Location Table---
|_ Pallet
Table
|
-----Box Table
So If i delete a row from Warehouse Location table i was expecting that all
rows from pallet and all rows from box table should be deleted?
Any help would be appreciated.
Kabir
 
 

Re:Cascade delete

Hi :)
What happens when You restart your application, is the data deleted?
 

Re:Cascade delete

Actually, you can add an AfterDelete / AfterPost event which will do
something like this:
{
Table1->Active=false;
Table1->Active=true;
Table2->Active=false;
Table2->Active=true;
Table3->Active=false;
Table3->Active=true;
}
and then see what happens...
I dont't know why but the simple TableX->Refresh(); doesn't help in
situations like this
 

{smallsort}