Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing Table Structures
Message
De
12/06/2001 10:19:27
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00518332
Message ID:
00518358
Vues:
21
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform