Culture="auto" and SQL Server issues

P

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.
 
N

Nicole Calinoiu

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,082
Latest member
KetonaraKetoACV

Latest Threads

Top