Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing a Character field for Numeric Data'
Message
 
To
28/07/2009 14:00:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01415119
Message ID:
01415478
Views:
61
> 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform