Bug #42770 | MySQL ODBC is rounding Float(M,D) data | ||
---|---|---|---|
Submitted: | 11 Feb 2009 17:20 | Modified: | 12 Feb 2009 20:25 |
Reporter: | Adrian Chapela Cordeiro | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.19,3.51.27 and 5.1.5 | OS: | Windows |
Assigned to: | Jess Balint | CPU Architecture: | Any |
Tags: | ODBC mysql float |
[11 Feb 2009 17:20]
Adrian Chapela Cordeiro
[11 Feb 2009 17:26]
Adrian Chapela Cordeiro
Server version: 5.1.30 and 5.1.31 (I have tested these versions) Server is sending the values with total number of decimals. The round is doing on the client side.
[12 Feb 2009 20:25]
Tonci Grgin
We've been thinking over this for few days now with no luck. Best I can say is that vbs has no typing because everything is essentially a variant. Variant *might* be limited when it comes to floating point but we don't know... To work around problems like this, please use CDbl function: CDbl(rs.Field(0)) Won't fix as I don't see what to fix.
[12 Feb 2009 21:15]
Jess Balint
Dim v2 As System.Single v2 = 37.637535 MsgBox(v2) prints 37.63754