Is the Actual culture related SQL to CLR float-double conversions? Is the Actual culture related SQL to CLR float-double conversions? sql-server sql-server

Is the Actual culture related SQL to CLR float-double conversions?


I would want to know what the Type of the column in the DataSet was, and track that through until it arrives at the report. Is the web server on the same machine as the database, or is it on a different server? Maybe you use WCF to transfer that DataSet between the two. Also check the locale of the Report in the designer (look at Properties), and the data type that is being used for that field in the report (I just poke around in the XML of the RDLC file).

We had a similar issue where values with decimal places (like "10.5" became "105" when the value was serialized and deserialized without paying enough attention to the locale. For example, if you parse "10.5" in German, it will interpret the "." as a thousand separator, and ignore it, giving you the result "105". I'm guessing it's the same in es-CO.


This situation comes in cross laguage scenario where your UI thread culture is different from processing thread or server thread. Use consistent Cultureinfo.InvariantCulture while passing data from UI to server to SQL and format only when displaying on UI.

One more recommendation is to use decimal at SQL end.

Hope this helps.