Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding large numbers
Message
 
To
12/09/2013 09:02:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01582980
Message ID:
01582989
Views:
65
>If I'm running this code, the result is incorrect, because VFP cannot handle that large numbers.
>What would be a workaround?
>
>CREATE CURSOR cuTest (test c(20))
>FOR lnNr = 1 TO 7000
>	INSERT INTO cutest VALUES ("123456789012345")
>endfor
>SUM VAL(test) TO lntest
>
CREATE CURSOR cuTest (test c(20))
FOR lnNr = 1 TO 7000
    INSERT INTO cutest VALUES ("123456789012345")
endfor
SELECT  SUM(VAL(test)) FROM cuTest
But I'm not sure of the result is correct :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform