Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Numeric datatype (7,3)
Message
From
04/11/1998 16:53:43
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
 
 
To
04/11/1998 15:45:41
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00154545
Message ID:
00154578
Views:
18
If you are using a remote view, I seem to recall a problem with VFP and the SQL ODBC driver that caused some incorrect rounding with Numeric datatypes and decimals. It was a while ago that I was looking at this problem, so I can't remember the specifics, but I know there's an article on the KnowledgeBase that addresses this issue. Something about SQLCOLUMNS, which returns the structure of a table, returning an incorrect datatype length and truncating the decimals.

Sorry I can't be more specific. If you are really stuck I'll try to dig up the details.

>A SQL NUMERIC datatype of (7,3) stores .3 as .299, .6 as .599, and .7 as .699. The table being used is a VFP remote view, and the problem occurs when an update to SQL is issued. If an integer is in the value, this does not happen in most instances, though it does occur with 1.9, changing it to 1.899. The numbers .3, .6, and .7 are stored with approximation in a FLOAT datatype because they cannot be accurately represented in binary notation. Does this mean this a problem with these numbers with the NUMERIC datatype as well?
Eric Shaneson
Cutting Edge Consulting
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform