Tuesday, February 14, 2012

Data format conversion.

Hello,

I am jivesh, working on live project with asp.net & sql server2003. I am facing one problem, client is in belgium uses Dutch language, and we are english. when we enter decimal value in sql database it gets save but the client has server in dutch language and in Dutch "." is ",", so here sql gets conflict , it takes "," as character & gives error, eg .

Add an item and fill out the fields with numbers (e.g. 45.05 ). When you want to edit this item later on, the number has been changed to e.g. 45,05 and this gives an error .

While we input the values 45.05 it gets save as it is, but when we retrive the value in textbox to edit, it comes in the way 45,05. the dot gets converted in comma. please help me soon.

Thanx

As long as you use a numeric type, the comma or dot isn′t stored at all, this is just a case of client presentation issue. So that should be an issue. It depends on your client code how you handle those inserts to the database. Normally you pass a common decimal type to the server, so this one gets "converted" (or just inserted) into the database.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment