Home » Developer & Programmer » Forms » problem in master/detail relationship
problem in master/detail relationship [message #86155] Sat, 04 September 2004 17:20 Go to next message
Kumar Iyer
Messages: 12
Registered: August 2004
Junior Member
Hi,

I had a problem in generating the same seq. no in master and detail tables.

I had 2 tables 1-master and 2 details.

In the detail table there is one foreign key referencing master table.

I had created a form having master detail relation ship showing both master and detail fields.

In the backend i had created 2 database trigger for each master and detail writter on before insert for each row

also i had created a packaged having one variable

1-in case of master database trigger,it generates sequence number and assigns to primary key column also its value is retained in the package variable.

ie. packagename.vari_name:=sequence_no;

    :new.s_order_no:=packagename.vari_name;   

2- in case of detail database trigger ,it assigns the package variable to the foreign key value

 

:new.s_order_no:=packagename.vari_name;

 

But after doing these steps,when i run the form,it only insert s_order_no in master table and in detail table it remains blank column

 

Pl help
Re: problem in master/detail relationship [message #86179 is a reply to message #86155] Tue, 07 September 2004 03:22 Go to previous message
ala
Messages: 17
Registered: May 2004
Junior Member
hi,
yoy can make a control item on nmaster block , this new control item will be filled with the seq no.
trye this on :
create pre-insert trigger on master block level.
write the value of the seq that u created b4 on detail block.
regards
ala
Previous Topic: How to invoke third part OCX into D2k Forms
Next Topic: ora-03113 error while navigating from one record to another
Goto Forum:
  


Current Time: Sun May 19 10:32:48 CDT 2024