DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Cascade delete in forms 6.0

  1. #1
    Join Date
    Jun 2000
    Posts
    6

    Cool

    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

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    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.

  3. #3
    Join Date
    Jun 2000
    Posts
    6

    Cool

    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

  4. #4
    Join Date
    Oct 2000
    Posts
    3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width