Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alias name
Message
From
27/07/1999 13:23:43
 
 
To
27/07/1999 09:29:14
Jolene Dicks
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00246542
Message ID:
00246736
Views:
14
>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

Try <b>IF EVAL('a.'+cfield) != EVAL('b.'+cfield)</b>

>          Replace "A."+CField with "B."+CField

and <b> REPLACE ('a.'+cfield) WITH EVAL('b.'+cfield)</b>

>     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
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform