Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems in using the function EVALUATE()
Message
De
14/09/2017 16:36:44
 
 
À
14/09/2017 16:29:40
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP3
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01654324
Message ID:
01654334
Vues:
60
>>Please create a sample with a cursor, then it's more realistic.
>
>
>CREATE CURSOR MyCursor (HMF01 C(25), HMF02 C(25), HMF03 C(25))
>INSERT INTO MyCursor (HMF01, HMF02, HMF03) VALUES ("m.KHour * 1100000 / 110", "1100000", "")
>
>m.KHour = 300
>
>FOR ncounter = 1 TO 3
> STORE EVAL(EVALUATE("HMF" + PADL(ALLTRIM(STR(nCounter)),2,"0"))) TO nValue
>
> ? nValue
>ENDFOR
>
>USE IN MyCursor

This is a very good example of a very bad data design. Why store it that way????? If you have no control over this, then you must simply add a special handling of the first case.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform