Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table Driven Field Replace
Message
De
11/04/2007 18:30:16
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/04/2007 16:37:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Divers
Thread ID:
01214702
Message ID:
01214756
Vues:
8
>>I am trying to put a field name in a table, then scan through the table and do a replace but I keep getting the Variable not found error for &rpl. Any Suggestions??
>>
>>SET SAFETY OFF
>>SET STEP ON
>>SELECT LXPOS
>>GOTO TOP
>>SCAN WHILE ! EOF()
>>rpl = ''
>>drpl = ''
>>rpl = ALLTRIM(LXPOS.XDATA) &&The Actual Data
>>drpl = ALLTRIM(LXPOS.XFIELD) && The table and field I am trying to replace
>>REPLACE &drpl WITH &rpl
>>ENDSCAN
>
>
>Replace &drpl. with rpl
>
AFAIK, this can also be done without macro substitution, e.g.:
replace (FieldExpr) with Value
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform