Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy to array: only 1?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00051523
Message ID:
00051526
Vues:
36
>I have a code table that has Type_Code and Code fields.
>I am trying to copy to an array all the Type_Code = to "PE" and I don't know why but it only copies the first record to the array. Here is my code:
>
>use codes
>set order to Type_Code
>count for Type_Code = "PE" TO ctn
>DIMENSION aCode(ctn)
>COPY TO ARRAY aCode FIELDS Code FOR Type_Code = "PE"
>DISPLAY MEMORY LIKE Ape
>
>Thanks for your help

Ray, remove the line "DIMENSION aCode(ctn)" That pre-sets the size of the array. Copy to Array will automatically initialize and size the array correctly IF the array doesn't exist.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform