Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alias name
Message
De
27/07/1999 09:34:07
 
 
À
27/07/1999 09:29:14
Jolene Dicks
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00246542
Message ID:
00246543
Vues:
14
Look up the EVALUATE function in VFP help. Basically:
If eval("A."+CField) != eval("B."+CField)



>I have a program in which I need to compare certain fields from two tables to determine if there are any changes in the values.
>
>I have put the field names that I need to check to an array and seek both tables for matching records (by sin). Then I scan through my array which contains each field name (using a for loop). I then try to assign each alias name to the field name to compare. The field name is a variable for the current array element, and I am not sure how to reference the alias name to that variable.
>
>My code is similar to this.
>
>Select A
>Select B
>
>******Seek the sin I want in both tables and when found...****
>
>x=0
>For x= 1 to Alen(Afieldnames)
> CField = Allt(Afieldnames[x])
> If "A."+CField != "B."+CField
> Replace "A."+CField with "B."+CField
> Endif
>Next
>
>It is picking each field up as a string and always gets inside the If because the values aren't equal and then replaces the field with "A.FIRSTNAME" if that is the field element it is currently on.
>
>I need to know how the syntax on how to check the field values (A.Firstname, etc...)
>
>Any suggestions would be great.
>
>Jolene Dicks
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform