Home » Developer & Programmer » Forms » Cascading Problem
Cascading Problem [message #282262] Wed, 21 November 2007 05:31 Go to next message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

I have created a master detail form. I want that when master record deleted detail record should also be deleted. So I have changed the delete record behaviour property to "Cascading". When I had done form builder write appropriete pre_delete trigger on form level. But when i try to delete the master record still it show this error on the task bar "Can not delete master record when detail record exist". and it did not delete the record.
Tell me why the records are not delete.

Thanks
Re: Cascading Problem [message #282276 is a reply to message #282262] Wed, 21 November 2007 06:29 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
What is your appropriate "pre-delete" trigger? If you specify cascading deletes, I don't think you have to program anything for it.

MHE
Re: Cascading Problem [message #282278 is a reply to message #282276] Wed, 21 November 2007 06:34 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
PRE-DELETE trigger is created automatically by Forms Builder. Do not code it yourself.

When creating data blocks using Data Block Wizard, there's an option called "Enforce data integrity" (a checkbox). Did you check it? If so, there might be the KEY-DELETE trigger (also created automatically) which will prevent deleting master record when details exist. Remove that trigger.
Re: Cascading Problem [message #282403 is a reply to message #282262] Wed, 21 November 2007 22:22 Go to previous message
sweetkhaliq
Messages: 189
Registered: April 2006
Senior Member

thanks LittleFoot

Yes it creates a key-delrec trigger. Now i have deleted this trigger. Now it works fine.
thanks once again.
Previous Topic: Forms and Reports
Next Topic: using parameter for partition name in where clause & partition name in query data source name pr
Goto Forum:
  


Current Time: Sun Dec 04 20:20:15 CST 2016

Total time taken to generate the page: 0.11209 seconds