Home » Developer & Programmer » Forms » DELETING RECORDS - MASTER-DETAIL
DELETING RECORDS - MASTER-DETAIL [message #214092] Sun, 14 January 2007 23:09 Go to next message
ataufique
Messages: 79
Registered: November 2006
Member
I HAVE A MASTER-DETAIL FORM.
ONCE THE QUERY IS EXECUTED..HOW CAN I DELETE THE RECORD
ONLY FROM DETAIL TABLE.
DELETE_RECORD GIVES MESSAGE "CANNOT DELETE FROM MASTER"
IF PROC NEED TO BE WRITTEN..WHAT WILL BE THE CODE
icon6.gif  Re: DELETING RECORDS - MASTER-DETAIL [message #214100 is a reply to message #214092] Sun, 14 January 2007 23:36 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Dear ataufique,

I think that you have a master and detail block and you are issueing the DELETE_RECORD while your focus is on MASTER block. If you want to delete the child record then you have to GO_BLOCK('child_block_name') and then issue DELETE_RECORD. In addition to this I would suggest that you should first check the status of your record on which you are about to issue DELETE_RECORD, because if the status is INSERT then should be issuing CLEAR_RECORD instead of DELETE_RECORD.
Re: DELETING RECORDS - MASTER-DETAIL [message #214357 is a reply to message #214100] Tue, 16 January 2007 00:36 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Also have a look at http://www.orafaq.com/forum/t/75047/67467/

David
Re: DELETING RECORDS - MASTER-DETAIL [message #214537 is a reply to message #214100] Tue, 16 January 2007 23:07 Go to previous message
ataufique
Messages: 79
Registered: November 2006
Member
Thanks to you and Martin..
Anyway the problem was at form level, the previous programmmer who had design the form has reversed the relation between master-detail..
so the detail was behaving as master...
After changing the relation to actual which was at database the problem is solved.
no idea why the previous programmer has done this...
Previous Topic: I want to change property of block with a trigger.
Next Topic: if down arrow key is pressed, detail block window is displayed
Goto Forum:
  


Current Time: Mon Dec 05 06:58:00 CST 2016

Total time taken to generate the page: 0.11383 seconds