Click to See Complete Forum and Search --> : Cascade delete in forms 6.0


ora_dude
10-31-2000, 01:38 PM
I have a dev2k version 6i form. This form is based on a table that is a list of computers. I have another table, not in the form that contains the software installed on the computers. I want to be able to go into the form and delete a computer and have the relative software removed as well. Is there any way that I can do this within Oracle forms??

Thanks
ora_dude

tamilselvan
10-31-2000, 04:47 PM
Maintain foreign key in the child table. Also while creating the table use DELETE CASCADE option.

In the form, when parent row is deleted, Oracle automatically deletes child rows also.

ora_dude
11-03-2000, 07:26 AM
Is there anyway to do this change to the table after it has been created??
The table exists and already has data in it.....I would like to to this without having to drop and recreate the table. Is there any alter table or alter constraint options that I can use??

Thanks
Ora_dude

jlburke
11-03-2000, 10:35 AM
Try doing an alter table drop constraint on the foreign key to remove it and then do an alter table xx add constraint forceign key(col) references tablea on delete cascade to readd it with the cascading delete.

Hope this helps.