Decimal in SQLServer

P

Paperback Writer

Hi, i have in my application a field that is percentual, that means...can
have comma...my property that receive this data is a decimal and in my
SQLServer is also a decimal, but when i type, for example: 56.98, it's
ignoring the dot and saving 5698 in my SQLServer...how can i solve this ?
Wich type of data could i use ? float solve this ?
 
P

Patrice

I meant what is the code that pass back the value to SQL Server (building a
SQL statement as a string, using parameters ?)

From the later sample I'm not sure what are your settings. Is "." the
decimal separator as it seems from your first post or the thousands
separator as it looks like from the second post ?

For now it looks like to me this is a globalization issue when converting
the string back to a number (check that web.config, globalization section
uses the appropriate settings fro your country).

Patrice

--
 
B

bradley

Perhaps the local language setting on your SQL Server is not compatible with
this decimal formatting you are passing it. Execute the following on your
server, and it will return information about your localization setting:

sp_helplanguage @@LANGUAGE
 
M

Mark Rae

Hi, i have in my application a field that is percentual, that means...can
have comma...my property that receive this data is a decimal and in my
SQLServer is also a decimal, but when i type, for example: 56.98, it's
ignoring the dot and saving 5698 in my SQLServer...how can i solve this ?
Wich type of data could i use ? float solve this ?

See the replies from Patrice & Bradley regarding globalisation.

E.g. "one thousand two hundred and thirty-four point five six" would be
expressed numerically in some countries (e.g. UK & US) as "1,234.56 ", but
in many other countries (e.g. France) it would be "1.234,56"
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top