Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Index Tags using Variables
Message
De
29/11/2002 12:17:40
 
 
À
29/11/2002 11:49:38
Gaylen Miller
Leaderware Corporation
Fulton, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00728185
Message ID:
00728200
Vues:
15
This works in VFP 6 SP5. You can use macro expansion.

example
M.lcMytagname = "TAG1"
m.lcIndexExpr = field(1)+" + "+field(2)
index on &lcIndexExpr tag &lcMytagname
?key()
?tag()

Or 

m.lcIndexexpr = "index on "+indxtable.expr+" tag "+indxtable.tagname
&lcIndexexpr
?key()
?tag()

or 

M.lcMytagname = "TAG1"
m.lcIndexExpr = field(1)
index on &lcIndexExpr tag (m.lcMytagname)
?key()
?tag()

*!* However the following does not seem to work as expected (though I thought it would)
*!* ?key() returns "(m.lcINdexExpr)"

M.lcMytagname = "TAG1"
m.lcIndexExpr = field(1)
index on (m.lcIndexExpr) tag (m.lcMytagname)
?key()
?tag()


 
HTH

>(VFP 7.0 SP1)
>
>Hi,
>
>I would like to create new index tags for tables using tag names and index expressions contained in a table.
>
>The INDEX command will not allow me to use a variable or field reference for the tag name or expression.
>
>Is there a way I can accomplish this?
>
>Thanks
>Gaylen Miller
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform