Home » Developer & Programmer » Forms » error in deleting record due to foreign key violation (foracle orms 6i,windows xp)
error in deleting record due to foreign key violation [message #290623] Sun, 30 December 2007 22:13 Go to next message
dmerin
Messages: 30
Registered: December 2007
Member
Hi,

I CREATED A FORM AND A data block which is database block and one of the column in the table on which the block is based acts as a primary key column which acts as forign key in another table now when i used delete_record so as to delete a record iam gettg error FRM-40510 UNABLE TO DELETE RECORD
I DINT CREATE MASTER DETAILS BLOCK
ONLY MASTER BLOCK IS THERE
HOW TO DELETE RECORDS IN SUCH CASES IAM WORKING IN FORMS 6i

Please help
Re: error in deleting record due to foreign key violation [message #290643 is a reply to message #290623] Mon, 31 December 2007 00:24 Go to previous messageGo to next message
dmerin
Messages: 30
Registered: December 2007
Member
Hi,


Divya again

Did the viewers understand whats my doubt is

If not pls do ask

Iam ready to explain once again

Please answer me on urgent basis
Re: error in deleting record due to foreign key violation [message #290660 is a reply to message #290643] Mon, 31 December 2007 01:15 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Referential integrity constraints are created on a DATABASE level, not form level. It doesn't matter that you don't have two blocks in a form; deleting a record which is referenced by another record(s) violates referential integrity and Oracle doesn't allow it.

So: delete detail records first, and then delete master record.

Oracle can make your life easier if you choose to use the ON DELETE CASCADE option while creating foreign keys. It will automatically delete both master AND detail records.



Before posting your next message, please, read the OraFAQ Forum Guide. I believe your problem is urgent for you, but this is just a forum; noone gets paid for answering questions and people do it in their free time. Also, I guess you understand that this is a special time of the year; many of us are on holidays and do not visit the Forum that often. So, either be patient and wait until someone answers the question, or - if it is really urgent - call Oracle Support, pay their fee and (possibly) get an immediate answer.
Re: error in deleting record due to foreign key violation [message #291796 is a reply to message #290643] Sun, 06 January 2008 23:13 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: error in deleting record due to foreign key violation [message #291813 is a reply to message #290623] Sun, 06 January 2008 23:59 Go to previous message
dmerin
Messages: 30
Registered: December 2007
Member
ys prob is solved
Thanks
Previous Topic: triggers fired in certain situations
Next Topic: adjustable canvas
Goto Forum:
  


Current Time: Sun Feb 09 21:27:22 CST 2025