daogu

saniao
August 27, 2010

error in deleting record due to foreign key violation

Posted by : admin
Filed under : Forms

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


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


Answer: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.


Answer:Have you solved your problem?

David


Answer:ys prob is solved

Thanks

Related posts:

  1. deleting records Dear all I have a form that based on...
  2. error while deleting record Hi, Attached is the error I get while trying...
  3. unable to delete master which has detail Hi all, I have 3 blocks namely block1, block2,...
  4. i am getting error in forms 6i Dear Friends, What about solution for This error. We...
  5. FRM-40508 : ORACLE error: unable to INSERT record hello all.. i got an error frm:40508 . pls...


No Comments

(required)
(will not be published) (required)
(opitional)