Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01424771
Message ID:
01424772
Vues:
54
Karen,

Did you try this code
>SELE 2 
>USE TEACHERS INDEX TNAME
>Sele 3
>use ctable index cname 
>SET RELAtion TO TEACHER INTO teachers &&& ctable>teacher is operator
in the command window?

Also, NEVER use SELECT N (there N as a number). Use instead
use Teachers index tName alias Teachers shared in 0

select 0
use ctable index cname alias cTable shared
SET RELAtion TO TEACHER INTO teachers &&& ctable>teacher is operator
>Hi
>I am having a curious problem tha has only just started. I am using a set relation binding two databases A and B. When A is the control database, it works. WHen B is the control database, it doesn't work. Can anyone tell why this would not work? The only difference between the common field in both database is that the A database has 42 records, and the B has 38 (4 have been eliminated). Could this be cause of the problem?
>
>Here are the two samples i am using. The first works, the second does not. Suggestions would be appreciated
>
>k
>
>THIS WORKS
>
>close all
>SELE 2
>USE TEACHERS INDEX TNAME
>Sele 3
>use ctable index cname
>SELE 2
>SET RELAtion TO TEACHER INTO ctable &&& teachers>teacher is operator
>
>go top
>do while not eof()
>wait windo teacher && correct name appears
>sele 3
>wait windo teacher && same name appears
>sele 2
>skip
>loop
>enddo
>
>THIS DOES NOT WORK:
>close all
>SELE 2
>USE TEACHERS INDEX TNAME
>Sele 3
>use ctable index cname
>SET RELAtion TO TEACHER INTO teachers &&& ctable>teacher is operator
>
>go top
>do while not eof()
>wait windo teacher && correct name appears
>sele 2
>wait windo teacher && EOF - db fails to rotate.
>sele 3
>skip
>loop
>enddo
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform