Bug #1388 | MyODBC ignores decimals of a float for client using comma as decimal separator | ||
---|---|---|---|
Submitted: | 24 Sep 2003 1:28 | Modified: | 7 Oct 2003 13:45 |
Reporter: | Emery Fabrice NZEYIMANA | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 3.51.06 | OS: | Windows (Windows) |
Assigned to: | Venu Anuganti | CPU Architecture: | Any |
[24 Sep 2003 1:28]
Emery Fabrice NZEYIMANA
[2 Oct 2003 20:11]
MySQL Verification Team
I tested MyODBC on Windows XP Portuguese version which uses also the comma (,) as a decimal separator. I built a small graphical application with Borland Builder C++ and the float numbers were showed correctly with the comma decimal separator. Then I assume that your applicaction for unknown reason isn't handling the display of these type of data. Please contact the support of VB regarding this issue.
[3 Oct 2003 2:36]
Emery Fabrice NZEYIMANA
To Miguel: It also displays the floats for me but with all decimal parts changed into 0000 for example 20.765 will show up as 20,000 Just check again to make sure that it will show NON-zero decimal parts (I mean can you see a number like 18,3455 ? I worked with this application for 6 months without realizing that non-zeros were changed into zeros.
[3 Oct 2003 7:43]
MySQL Verification Team
Done and confirmed. Please see the pictute I sent you in separate e-mail.
[6 Oct 2003 23:49]
Venu Anuganti
Hi !! This is because of atof() which returns the value based on current locale settings. In order to make it work in the right way for you, i.e. to get decimal digit as ',' and rest of the data, you need to set the option 'Dont use setlocale' (256) from your DSN options dialog or simply OPTION=256 to your connection string. Could you please confirm this ? Thanks Venu
[7 Oct 2003 7:43]
Emery Fabrice NZEYIMANA
It now works with the option 256. But I think it's bug since it should not cut off the decimal part of the number when the user doesn't add that 256 option. I think this 256 option should be set by default. And for these versions, it should be a recommended thing in the manual and tutorials. Do you support my view? Thanks for being there!!!! Emery
[7 Oct 2003 13:45]
Venu Anuganti
Well, thats correct. We will update the FAQ document to reflect this. Thanks
[26 Apr 2004 11:36]
Alejandro Perez
Hi, i have this problem and OPTION=256 didnt solved it. What else i can do? Thanks. Alejandro.
[17 Jul 2005 13:50]
Ronal Rodriguez
I´m working in C++builder 6 mount->Text=34.00; mount is connectec at column mount in my database. In the database mount default value is 0.00 and format is DECIMAL(10,2) i have a DBGrid connectec at database for view the results but, when post in database the DBGrid mount column=34 (not 34.00) :( Please helpme and Thanks :)