Précédent   Forum des professionnels en informatique > Bases de données > Oracle > Outils > Forms
Forms Forum d'entraide sur Oracle Forms
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 26/10/2011, 11h19   #1
Invité de passage
 
Inscription : octobre 2006
Messages : 19
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 19
Points : 1
Points : 1
Par défaut relation many-to-many avec forms

Bonjour,
j'ai une relation avec les immobilisations et les factures des immobilisations comme suite une immobilisation peut avoir plusieurs factures et une facture peut contenir plusieurs immobilisations donc on a une table d'association entre les deux tables immo et facture qui s'appelle immo_fact.
le probleme est comment je vais proceder pour qu'a l'insertion des informations dans le block immobilisations et le block factures, les cles primaires de ces dernieres doivent etre inserer dans la table immo_fact;
j'ai commencer par faire une relation master detail entre le block immo(master) et le block immo_fact(details) et une autre relation entre le block facture(master) et le block immo_fact (details) mais rien n'est inserer dans la table immo_fact.
merci d'avance
m_elkhaldi01 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/10/2011, 09h20   #2
Membre Expert
 
Avatar de Garuda
 
Homme Philippe CHIRCOP
Chef de projet
Inscription : juin 2007
Messages : 1 109
Détails du profil
Informations personnelles :
Nom : Homme Philippe CHIRCOP
Localisation : France

Informations professionnelles :
Activité : Chef de projet
Secteur : Bâtiment

Informations forums :
Inscription : juin 2007
Messages : 1 109
Points : 1 559
Points : 1 559
A priori, il y a des choses dans la doc Forms
Citation:
Detail-with-two-masters
A detail-with-two-masters relation involves a single detail block that has two master blocks. Form Builder displays the appropriate detail records for whichever master block is the current block in the form. For example, in the sample application referred to earlier, the ord block could be a detail block having two master blocks, CUSTOMER and EMP. End users could then see all of the orders for a particular customer, or for a particular sales representative (employee).
Usually, when you create a detail-with-two-masters relation, you will be joining on different foreign-key items in the detail block. In such cases, the Copy Value from Item property is set for each foreign-key item in the detail block to point to the primary-key item in the appropriate master block. To create this type of relation, you need only define the two relations; Form Builder will automatically support coordination.
In other cases, however, you might want to create a master-with-two-details with each relation joining on the same foreign-key item in the detail block. However, because the Copy Value from Item property can only point to one master block item, you will need to write additional code to coordinate querying and updating for the second relation if you are joining on the same item in the detail block.
Depending on the desired functionality, this might include writing a Pre-Query trigger for the detail block to ensure that the correct primary-key item value is copied to the foreign-key item in the detail block. For example,
COPY(NAME_IN(:system.master_block||'.primary_key_item'),
'detail_block.item');

You might also want to create a When-New-Block-Instance trigger that checks the coordination status of the detail block whenever the end user navigates to a different master block, and, if necessary, populates the detail block.
__________________
Garuda गरूड
Brahmâ la Guerre et Vishnu la Paix

Oracle 10.2.0.4 - Forms6i patch 17 - Toad 11.1 - sharePoint 2010
Garuda est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/10/2011, 18h19   #3
Invité de passage
 
Inscription : octobre 2006
Messages : 19
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 19
Points : 1
Points : 1
merci pour la reponse
j'ai fais les etapes citées dans votre poste mais ca marche pas les informations ne sont pas stockés dans la table relation apres la validation.
je vais essayer de remplir manuellement la table relation est ce qu'il n y a probleme sur l'application si je fais un insert explicite
m_elkhaldi01 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 08h51.


 
 
 
 
Partenaires

Hébergement Web