Link to home
Start Free TrialLog in
Avatar of pardeep_nagra
pardeep_nagra

asked on

Implementing many-to-many relationships in Oracle Forms 5

What is the best way to implement a many-to-many relationship in Oracle Forms 5?

I'll tell you what I have already tried... Ok so you got 3 tables altogether, relationship is one to many and many to one.

I tried using the built in JOIN and making the intermediary table the child of both other tables, however, although when it comes to populating this child table with values it populates them on the screen at run-time, when I try and save the record it does not insert the values into the database... I have tried everything, the data target property for the table is set to the table. I am so confused as to why it does not insert these values into the database, especially as it displays them in the Form...

Is this a bug in Forms 5???

I also tried implementing it by manually inserting the values into the intermediary table each time the parent primary keys were entered, and although this gives me the functionality I want, I get problems when trying to hide the intermediary table on the screen as I get an error message as it cannot see the items for the intermediary table...

Am I making a mountain out of a mole hill??? Is there a simple way to do this?? Could you send me some sample code for this???

Also I want to add an online Help facility into my menu system for the Forms... What is the best way to do this?? How do you create a form on which you display, say, the contents of the help document and then when the user clicks on the keyword it navigates to the relevant section?? Could you give me some example code for this??

I am writing a Change Request Application for British Telecom as my Final year University project... anyone got any ideas on how to make it an 'A' grade project?? In terms of functionality how can I demonstrate that I can do some real expert stuff in Forms?? Any help would be much appreciated...

Thank you for your help...

Could you email me with all your replies on: pardeep_nagra@hotmail.com

Regards,

Pardeep Nagra

Avatar of pardeep_nagra
pardeep_nagra

ASKER

Please, please, please can someone help??
When you are trying to insert the record what error message are you getting? Choose Help -> Display Error to see the actual statement that was issued. Designing a form like this is simple infact. But, let's start by looking at the error. If you could give the table structures I will be able to send you an fmb file for you.
as crsankar pointed out , post the error message.

Note: If the answers are sent by email, then the pupose of this site is lost. So i would appreciate if all the replies to this thread are posted here.

Regards,
Sudhi.
There is no error message when I try to insert the data... infact that is the strange thing, that's why I don't understand why it doesn't insert the data, it inserts data into other tables in other blocks on he same form, but does not insert this data for the intermediary form...
As for sending the data structure, the tables are:

Staff_Member   Staff_allocation Module
------------   ---------------- ------
Staff_Id       Staff_Id         Module_Id
Name           Module_Id        Name
Address                        
etc.             etc.            etc.

(Staff_Id and Module_Id are primary keys)


Could you please send an FMB file to show how to implement this? I asked one of the Forms developers at BT about this and he suggested I should insert values into the intermediary table manually by an assignement step in a trigger eg:

:Staff_allocation.Staff_Id := :Staff_member.Staff_Id;

:Staff_allocation.Module_Id := :Module.Module_Id;

But I am sure it is possible to implement using the Forms Wizard and by using a JOIN between the tables... but it doesn't seem to inser the the values into the database for some reason...

If you send the FMB could you test to see it works before sending it...
ASKER CERTIFIED SOLUTION
Avatar of crsankar
crsankar
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
CRSANKAR Could you please email me the file you created for the sample form?? It would be of great help to see how it should actually look...

I know you are not supposed to email replies direct on this site as it takes away the pupose of this great aid, but if you could email me the forms file it would be of great use... I urgently need to finish the forms due to my deadline for the project...
thanks...

Have you got any ideas on my other queries regarding the way to implement an online help facility in Forms 5??

Also, the way in which I could make the project more detailed to obtain a higher grade?? What are some oof the ways in which you could make Forms 5 more complex??

email: pardeep_nagra@hotmail.com
emailing the form kind of files is fine, but when your work is done, post a comment as to how you got the problem solved.

Regards,
Sudhi.