dbTalk Databases Forums  

How can delete a record in a master-detail relation

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss How can delete a record in a master-detail relation in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
paul
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 02:29 PM







"nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote

Quote:
Hi to All,

I have created a Form with 3 Blocks:
1) MASTERBLOCK, Table1, PK MASTER_CODE
2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
3) TOOLBAR with button SAVE, ADD, DELETE etc...

All Work fine! I can Add, Modify, Save all in the Master and in Detail
Block.

But If I try to Delete a Master Record, this message is displayed:

CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
RECORDS (NB. I have translated the message from italian language)

In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:

Delete_Record ;

Please can anyone help me in order to delete the master and the detail
records?

Thank You and Best Regards
Gaetano
Cascade delete
http://www.techonthenet.com/oracle/f...ign_delete.php




Reply With Quote
  #22  
Old   
paul
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 02:29 PM







"nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote

Quote:
Hi to All,

I have created a Form with 3 Blocks:
1) MASTERBLOCK, Table1, PK MASTER_CODE
2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
3) TOOLBAR with button SAVE, ADD, DELETE etc...

All Work fine! I can Add, Modify, Save all in the Master and in Detail
Block.

But If I try to Delete a Master Record, this message is displayed:

CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
RECORDS (NB. I have translated the message from italian language)

In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:

Delete_Record ;

Please can anyone help me in order to delete the master and the detail
records?

Thank You and Best Regards
Gaetano
Cascade delete
http://www.techonthenet.com/oracle/f...ign_delete.php




Reply With Quote
  #23  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #24  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #25  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #26  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #27  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #28  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
  #29  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-24-2008 , 09:59 PM



paul (paulq_1998 (AT) yahoo (DOT) com) wrote:

: "nick048" <nicosia.gaetano (AT) moonsoft (DOT) it> wrote in message
: news:9e0dfb25-3696-4e9a-b466-d26411856dbd (AT) n77g2000hse (DOT) googlegroups.com...
: > Hi to All,
: >
: > I have created a Form with 3 Blocks:
: > 1) MASTERBLOCK, Table1, PK MASTER_CODE
: > 2) DETAILBLOCK, Table2, KEY = DETAIL_CODE
: > 3) TOOLBAR with button SAVE, ADD, DELETE etc...
: >
: > All Work fine! I can Add, Modify, Save all in the Master and in Detail
: > Block.
: >
: > But If I try to Delete a Master Record, this message is displayed:
: >
: > CANNOT DELETE THE MASTER RECORD IF THERE ARE CORRESPONDING DETAIL
: > RECORDS (NB. I have translated the message from italian language)
: >
: > In the trigger WHEN-BUTTON-PRESSED of DELETE Button I have entered:
: >
: > Delete_Record ;
: >
: > Please can anyone help me in order to delete the master and the detail
: > records?
: >
: > Thank You and Best Regards
: > Gaetano

: Cascade delete
: http://www.techonthenet.com/oracle/f...ign_delete.php

Or Form trigger PRE-DELETE (spelling?), at the Block level
is the hook that allows you to delete them yourself just before Forms runs
the delete command for the master.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.