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
  #1  
Old   
nick048
 
Posts: n/a

Default How can delete a record in a master-detail relation - 02-16-2008 , 02:29 AM






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

Reply With Quote
  #2  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM






On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #3  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #4  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #5  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #6  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #7  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #8  
Old   
nick048
 
Posts: n/a

Default Re: How can delete a record in a master-detail relation - 02-16-2008 , 10:20 AM



On 16 Feb, 09:29, nick048 <nicosia.gaet... (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.

I have solved. In relations I have set to cascading the property.
Bye
Gaetano

Quote:
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


Reply With Quote
  #9  
Old   
DA Morgan
 
Posts: n/a

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



nick048 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
Delete the detail records first.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #10  
Old   
DA Morgan
 
Posts: n/a

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



nick048 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
Delete the detail records first.
--
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


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.