Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    36

    Question Unanswered: master-detail relation

    hello everyone.
    i m facing a problem in master detail form.i have master record table and its detail record table respectively.
    in master table fields are:h_id(primary key),name,skills.
    in detail table fields are :h_id(primary key of master table i.e foreign key),t_name,comments.
    the problem is:
    when i try to insert record in both table,first time record entry is perfect.
    for e.g in master table record is as follows:
    h1,abc,sap
    in detail table record is as follows:
    h1,student,good
    it will insert the record,but second time when i try to insert another detail record for the same entry of master record,it display an error message :::: unable to insert.
    can anybody tell me how to insert multiple detail records for a single entry of master recod.

  2. #2
    Join Date
    Feb 2006
    Posts
    173
    Provided Answers: 1
    Without knowing the exact Oracle error message, A suggestion is to validate that the detail tables key is not defined as having to be unique.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As it is a Forms question, perhaps you should - once the error raises - go to Help menu and select "Display error". It should tell you exact reason (including ORA-xxxxx error code). If you don't know how to solve it, please, post the information you have found.

  4. #4
    Join Date
    Feb 2009
    Posts
    36
    thanks alot for reply.it is giving the following error:


    ORA-00001: unique constraint (SCOTT.SYS_C00104431) violated

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    OK then, it is self-explanatory: don't try to insert values which will violate unique constraint.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •