Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Floating point and remote views
Message
From
21/07/2011 10:08:18
 
 
To
21/07/2011 09:44:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01518756
Message ID:
01518763
Views:
61
This message has been marked as a message which has helped to the initial question of the thread.
Charles,

Can you cast as B(16) ?

>I am hoping some of the serious math wonks will take pity on an old man who still finds long division challenging.
>
>I have SQL database tables that make heavy use of floating point numbers.
>
>In my remote view, I am pulling half a dozen of those numbers. The remote view defines them as data type 'B' ( of which I have not previous experience)
>
>I need to multiply those number together, then put the result in a field I created as part of the remote view ( casting a 0 as float )
>
>But in the watch window these values all show up as N , even though the values can look like 140333030.002033021000
>And when I multiply them the result looks like a float, But when I try to save the value into a view column, I get a numeric data overflow.
>
>Trying to cast the numbers as B just gets them lopped off after about 4 decimals. ( I think this has something to do with 16bit vs 32 bit math, but since my brain runs on an i386sx chip, it is beyond me )
>
>I'm sure this problem is nothing new to anyone who has tried it and I found this
>
>http://fox.wikis.com/wc.dll?Wiki~VFPFloatingPointDataType
>
>on the wiki.
>
>But I am trying to wrap my brain around how to employ conversions ( and which of the functions to use ) in pulling, manipulating and hopefully saving the data.
>
>Really stuck on this one.
>
>TIA
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform