I have got several thousands of lines of a web application source code, initially written on a US development system, to maintain. It makes heavy use of SQL statement strings, which are combined on the fly, e.g.
string SQL = "select * from table where double_value = " + Math.Round(double_value, 2);
Don't comment on bad programming style, that doesn't help me in this case :)
The crux: My system uses a German locale, which in turn leads to wrong SQL statements, like this:
"select * from table where double_value = 15,5"
(Note the comma as decimal separator instead of a point).
Question: What is the most "elegant" way to change the locale of the web app in this case) to US or UK in order to prevent being forced to change and inspect every single line of code? .NET 3.5 is not an option (would give me the chance to overwrite ToString()
in an extension class.)