By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,356 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,356 IT Pros & Developers. It's quick & easy.

Culture="auto" and SQL Server issues

P: n/a
PL

The Culture="auto" UICulture="auto" is a great idea, but how do you handle the situaion
where SQL Server always requires a dot "." in numeric values.

If I use Culture="auto"so that dates and numbers are formatted depending on the
browser settings I will encounter situations where values come in as for example "52,50"
using a comma instead of a dot.

I could go over the whole site and make sure I replace any commas with dots before
passing it along to the queries/sp's but that's a huge job, someone at MS must have thought
about this situation (I hope).

PL.
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
This shouldn't be an issue if you cast the data to its appropriate numeric
type and using parameterized commands. If you're simply concatenating
string values into SQL statements, then you're setting yourself up for far
worse problems than simple format misinterpretation since your code will be
wide open to SQL injection attacks.

"PL" <pb****@yahoo.se> wrote in message
news:uL**************@TK2MSFTNGP09.phx.gbl...

The Culture="auto" UICulture="auto" is a great idea, but how do you handle
the situaion
where SQL Server always requires a dot "." in numeric values.

If I use Culture="auto"so that dates and numbers are formatted depending
on the
browser settings I will encounter situations where values come in as for
example "52,50"
using a comma instead of a dot.

I could go over the whole site and make sure I replace any commas with
dots before
passing it along to the queries/sp's but that's a huge job, someone at MS
must have thought
about this situation (I hope).

PL.

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.