Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: question on master-detail form!!!!.

Re: question on master-detail form!!!!.

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Mon, 21 Jun 1999 08:53:13 +0100
Message-ID: <376ded16.0@145.227.194.253>


When you enter details into the master block, the block is marked as changed, therefore oracle will try and save the record at commit time, oracle is behaving as it should.

You should build some logic into your master block, maybe on the unique field that after a value is entered in the unique field, if the record exists, query automatically else treat the record as new. That way, forms should behave itself.

M

Ashok K Solipuram wrote in message ...
>Hi,
> I created Master_detail form.The details are as follows:
>
>Master has a primary key column on which it is joined to detail block.
>On the form,I have one field(Primary Key) in master block and several
>fields(columns) in the detail block and both are on the same canvas.
>When I run form & enter a new item in master field & corresponding details
>records for that master & save it,its saves fine,but when I clear form &
>enter same field(item) in master record & enter different detail record
>for the same master item,it does not save the detail record,it gives error
>"Oracle Unable to insert record" and when I click on history,it tells me
>that "ORA-00001:UNIQUE CONSTRAINT(Primary Key)VIOLATED" and cursor moves
>to Master Block.
> But if I query & try to insert detail record for that master,it
>saves.The problem comes only when I try to insert a detail record for
>already existing master record & also if it already had some detail
>records.
>
> Can anyone tell me,is there way to insert detail record for already
>existing master record other than querying and inserting detail record.
>
> can anyone tell me how to populate details automically if it exists for
>the master record when we enter the master item without manually
>executing the query in detail block.
>
>
>Thanks in Advance.
> Ashok.
>P.S:I am using forms 4.5.7.1.8
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Received on Mon Jun 21 1999 - 02:53:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US