Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing all fields in a table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01421950
Message ID:
01421952
Vues:
64
>>There is a way to index all fields in a dbf via a FOR loop. I cannot seem to get the syntax correct. Can anyone help (or is there a better way?)
>>
>>Thanks, Randy
>
>Sure but WHY?
>
>lnFIelds = AFIELDS(laFields,"TableName")
>FOR lnFor = 1 TO lnFIelds
>    IF NOT laFields[lnFor,1] $ "MG"
>       lcIndex = "INDEX ON "+laFields[lnFor,1]+[ TAG ]+laFields[lnFor,1]
>       &lcIndex
>    ENDIF
>NEXT
>
>
>NOT TESTED, esp. for every kind of field names and types.

Right, would not work for long field names (DBC) - we need only 10 chars for the tag name.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform