>>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