Form Updation(linking of three tables) [message #285381] |
Tue, 04 December 2007 06:09 |
satishveluru
Messages: 8 Registered: September 2007
|
Junior Member |
|
|
hai,
i have threee tables
1)master
2)parent
3)child
strucure of these tablers like
master( ackno number,
assessmntyear varchar2,
financial year varchar2,
----
-----);
parent (ackno number,
assessmntyear varchar2,
financial year varchar2,
headcode varchar2,
amount varchar2,
-------)
child (ackno number,
assessmntyear varchar2,
financial year varchar2,
headcode varchar2,
subhead varchar2,
subamount number,
---);
coming to form
------------------
after giving master details it will go to parent details
by pressing parent it will go to child details
for very first time it is saving
and next time upadastion it is not allowing
unique constraint violated;
master
ackoo1 2001-2002 2000-2001
parent
business 1000
child
business loss 100
this is the form strucure
suppose i want to update 100 to 80 next time retrival it is showing unique constraint violated;
|
|
|
Re: Form Updation(linking of three tables) [message #285385 is a reply to message #285381] |
Tue, 04 December 2007 06:25 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
We'll need a little bit more information: what constraint on what table is violated? And next time, if you use the tags [CODE] and [/CODE] around your code samples, your code is easier to read.
Is the following structure correct? Foreign key relations are displayed with 'REF'.
master( ackno number
, asm_year varchar2
, fin_year varchar2
);
parent( ackno number REF master.ackno
, asm_year varchar2 REF master.asm_year
, fin_year varchar2 REF master.fin_year
, headcode varchar2
, amount varchar2
);
child ( ackno number REF parent.ackno
, asm_year varchar2 REF parent.asm_year
, fin_year varchar2 REF parent.fin_year
, headcode varchar2 REF parent.headcode
, subhead varchar2
, subamount number
); It appears that your form is trying to insert a new record instead of updating the existing record.
MHE
|
|
|
|
Re: Form Updation(linking of three tables) [message #285594 is a reply to message #285413] |
Wed, 05 December 2007 02:05 |
satishveluru
Messages: 8 Registered: September 2007
|
Junior Member |
|
|
thank you for your reply
i think you got my error while updation the records;
with updation ;
from master data it is going to retrieve parent data from(different table)
this is linking with previous data .
here suppose for the master field(assessmntyear 2000-2001;)
we are retrieving parent data from one form and putting into current form (using cursor );
and saving the inthe current form;
ok thanu i will try with datablocks;
keep in touch
bye;
|
|
|