Home » Developer & Programmer » Forms » DELETING FROM MASTER USING FORMS
DELETING FROM MASTER USING FORMS [message #224155] Tue, 13 March 2007 05:23 Go to next message
ataufique
Messages: 79
Registered: November 2006
Member
I have a master maintanence form with records of master table 'A'
Now this master table has 4 child table with ON-DELETE-CASCADE
set at database level.
So if i delete the master record using SQL, the child records
get deleted.
How this can be done with form..as when i say delete_record
in forms..it gives error frm-40510 : unable to delete record.

Pls help, how the master record can be deleted such that the child record also gets deleted...

Regards,
ATaufique
Re: DELETING FROM MASTER USING FORMS [message #224175 is a reply to message #224155] Tue, 13 March 2007 06:13 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Now you know that Oracle can not delete a record. Click 'Help - Display error' to see WHY it can not be done.
Re: DELETING FROM MASTER USING FORMS [message #224196 is a reply to message #224175] Tue, 13 March 2007 06:48 Go to previous messageGo to next message
alijeyan
Messages: 180
Registered: January 2007
Location: IRAN
Senior Member
Hi
for delete records from Master and Detail you should set
the property " DELETE RECORD BEHAVIOR " in the relations of Master
block with "CASCADE"
Re: DELETING FROM MASTER USING FORMS [message #224359 is a reply to message #224196] Wed, 14 March 2007 01:32 Go to previous messageGo to next message
ataufique
Messages: 79
Registered: November 2006
Member
Hi.

LittleFoot - the error as i mention is that record cannot be deleted when child record exists.

alijeyan - The form contains only master records, So there is no relation avialable in form..

One option I believe is that writing DELETE FROM < Each child
table > in ON-DELETE trigger.
But i am looking for a option such as ON-DELETE-CASCADE( Auto).

Pls suggest..

Regards.
Re: DELETING FROM MASTER USING FORMS [message #225453 is a reply to message #224359] Tue, 20 March 2007 00:11 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

Delete the child recordfs in the Pre-Delete, not the On-Delete. Read the documentation for a fuller explanation.

David
Re: DELETING FROM MASTER USING FORMS [message #225980 is a reply to message #225453] Thu, 22 March 2007 02:49 Go to previous message
ataufique
Messages: 79
Registered: November 2006
Member
Thanks Martin.

But tomorrow if i am adding more child table then again i have
to change the coding of pre-delete trigger to delete from
this child table.
Means the database design With on delete cascade is of no use as
i am allowing delete from FORMS only.
Trying to find some other way.

Regards,
Taufique Ahmed.
Previous Topic: Sending mail and print from 'form'(URGENT PLEASE)
Next Topic: want to search in new style
Goto Forum:
  


Current Time: Mon Dec 05 18:51:51 CST 2016

Total time taken to generate the page: 0.09400 seconds