Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing Table Structures
Message
From
12/06/2001 10:19:27
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00518332
Message ID:
00518358
Views:
20
>George,
>A little tweak could be to add an ASORT() (if the position doesn't matter) and simply compare Aflds1 to Aflds2 for every element. The same comparison could be done without the ASort if the position matters.
>* provided lnSize1 and lnSize2 are equal
>if !llorder then
>   =asort(Aflds1,1)  && sort on column name
>   =asort(Aflds2,1)  && sort on column name
>else
>   * order matters so don't sort the arrays
>endif
>llMatch = .T.
>for lxx = 1 to lnSize1
>   for lyy = 1 to 16
>      if Aflds1(lxx,lyy) # AFlds2(lxx,lyy) then
>         llMatch = .F.
>         exit
>      endif
>   endfor
>   if !llMatch then
>      exit
>   endif
>endfor
>
>return llMatch
>

Ok guys, you're on a roll... It's not necessary for what I'm doing at the moment, but how would I tweak the the code to return the alias and field name for the non-matching fields? ...and what if there are more than one?

Renoir
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform