Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » truncated double values from mysql
truncated double values from mysql [message #25047] Tue, 09 February 2010 10:21 Go to next message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
Hello,

if i set up my system to LC_NUMERIC=de_DE upp uses ',' as decimal point in double values.
the problem is, that the atof() function now also only accepts double values with a ',' as decimal points.
the mysql plugin however also uses atof() to read doubles from the database. but it seems to me, that mysql always returns doubles with '.', not matter what LC_NUMERIC i set.
is it possible, to change the call to atof() in mysql package to ScanDouble(), so that i always get back the right value...

greetings,
Matthias

PS: sorry for my bad english...
Re: truncated double values from mysql [message #25049 is a reply to message #25047] Tue, 09 February 2010 10:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11844
Registered: November 2005
Ultimate Member
Yes, done. TO be sure, I have allowed '.' or ',' as decimal separator

case DOUBLE_V:
f = ScanDouble(s, NULL, true);
break;


Mirek
Re: truncated double values from mysql [message #25050 is a reply to message #25049] Tue, 09 February 2010 10:51 Go to previous message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
Great!

Thanks a lot Smile
Previous Topic: PostgreSQL and binary data
Next Topic: Workaround: Hybridizing SqlExp usage
Goto Forum:
  


Current Time: Thu Apr 25 13:47:48 CEST 2019

Total time taken to generate the page: 0.01468 seconds