Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Large numbers with high decimal precision
Message
From
29/08/2011 23:46:45
 
 
To
29/08/2011 20:23:45
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01522171
Message ID:
01522189
Views:
82
>Client's data has SQL columns of Decimal(22,10)
>
>I have remote views and controls bound to those views.
>
>How can I let the client enter 123456789012.1234567890 and have that saved to the back end.
>
>Seems the best I can do in a VFP cursor is 123456789012.1235000000 which is unacceptable. (
>
>B(16) float doesn't seem to help.
>
>Do I just tell them "sorry, VFP can't handle SQL numbers"
>
>Do I have to fiddle something using text fields and building SPT from scratch ( completely destroying the structure of the app for a couple of field values)
>
>Having kind of an I hate Foxpro day.
>
>Any help ?

As you've found, VFP only natively supports 15/16 digits of precision.

Hilmar Zonneveld has made available Download#10044 which is supposed to support arbitrary precision (I haven't used it). Maybe you can use it, or get some ideas from it.

The only other approach I can think of is to split the field, into, say, one part for the integer, the other for the decimal portion. But, that's the ugly fiddling you're trying to avoid.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform