Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing a Character field for Numeric Data'
Message
 
À
28/07/2009 14:00:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01415119
Message ID:
01415478
Vues:
63
> but this doesn't work every time. e.g. when luValue = '08'

You could remove leading zeros:
lcValue = Alltrim("    0000800.00  ")
If not " " $ m.lcValue
  lcValue = Chrtran(Ltrim(Chrtran(m.lcValue,"0"," "))," ","0")
EndIf
? m.lcvalue 
TYPE(), EVALUATE(), etc. all have the disadvantage of executing VFP code. If I'd by called to a security review of your application, one thing I'd try is to enter
execscript('ZAP')
into the text field. If you use TYPE(), you can see that the table is ZAPped, because the code is executed. It's your decision, though. ;-)
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform