Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Adel Kadi
  Where is Adel Kadi?
 Fairfax
 Virginia - United States
 Adel Kadi
 To: Erik Gomez
  Where is Erik Gomez?
 Victorias City, Negros Occidental
 Philippines
 Erik Gomez
 Tags
Subject: RE: Many to many relationships
Thread ID: 15706 Message ID: 15794 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, October 01, 2002 2:51:33 AM         
   


> > From your explanation I assume that you have duplicate names in table1 and you need to display one(name)-to -many(doc) relation. Then you should create a cursor/view having distinct names from table1 and then set one-to-many relations ans needed.
> >
> > > I have the situation where many to many relationships exist between two table and I do not know how to build this link as follows:
> > >
> > > Table one contains names
> > > Table two contains documents
> > >
> > > A document can ´belong´to one or many names
> > >
> > > More than one document can belong to any name
> > >
> > > Eg.
> > > Doc1 ´belongs´to name1
> > > Doc2 ´belongs´to name1, name2, name3
> > > Doc3 ´belongs´to name2,name3
> > > etc
> > >
> > > I wish to display ALL the documents belonging to a single name in a form e.g.
> > >
> > > Name1 in textbox and a table containing Doc1 and doc 2. I wish to ´move´(skip) on to name 2 and display doc2 and doc3 etc etc
> > >
> > > Help appreciated. thanks in advance
> > >
> > > Anthony
> hi,
>
> uploaded a sample form in the link below, check the code in the form's init event.
>
> https://www.foxite.com/uploads/rx09rn9u.zip
>
> hth,
> Erik Gomez
> Long Live www.foxite.com
Hi Mr/Gomez
Sorry to get into this discussion but i liked the way many to many is done and i am trying to do a form with three grids
the same but i don't want to write it manualy means i set up a RecordSource to each grid so my problem now
is how to make them work the same way your many to many works? Like for example grid1 has the artists table so
if i choose artist #1 it will show me his records and tracks.and here is the tables and indexes:
Recordings.dbf indexes: recordingid,recordingartistid
Recording_artists.dbf indexes: recordingartistid
Tracks.dbf indexes : Trackid,recordingid
and which one should be the master or parent which i think grid1.
Thanks very much for your help in advance
kadi

ENTIRE THREAD

Many to many relationships Posted by Anthony Richards @ 9/27/2002 5:22:36 PM
RE: Many to many relationships Posted by Yuri Rubinov @ 9/27/2002 8:09:19 PM
RE: Many to many relationships Posted by Erik Gomez @ 9/28/2002 4:34:46 AM
RE: Many to many relationships Posted by Adel Kadi @ 10/1/2002 2:51:33 AM
RE: Many to many relationships Posted by Erik Gomez @ 10/1/2002 8:25:54 AM
RE: Many to many relationships Posted by Adel Kadi @ 10/1/2002 10:52:44 PM