[Mono-devel-list] Using floats with decimal comma from MS-SQL db (internationalisation)
maze at strahlungsfrei.de
Sun Oct 3 18:24:59 EDT 2004
there is a big problem with using Float or Money values with DataSets and
SqlClient on MS-SQL Server.
I am doing a query from a table with Money values. Those are returned with
decimal comma, as we are having a localized German database. Using a
DataSet with a DataReader and a prepared update command, updating fails.
This is because the comma is recognized as a separator between different
I worked around this by changing the NumberFormatInfo of the Culture in the
current thread. This works as long as the float fields are changed
(rewritten) before the adapter.Update().
If not all float fields are changed in between, the update fails again,
because the update statement is filled with the original field values, with
contain the decimal comma.
To cut a long story short, in my opinion this is a real shortcoming,
supposedly in the TDS client code. From my point of view, it doesn't seem
to convert float and money values correctly! This is really bad behaviour
and I won't be able to get my program any further without a fix..
Appreciating any help!
More information about the Mono-devel-list