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

Decimal in SQLServer

P: n/a
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 ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
How do you pass this value back to SQL Server for now ?

Patrice

--

"Paperback Writer" <ne*********@gmail.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
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 ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx

Nov 19 '05 #2

P: n/a
for example: 134.562,56

--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
"Patrice" <no****@nowhere.com> escreveu na mensagem
news:O0**************@TK2MSFTNGP14.phx.gbl...
How do you pass this value back to SQL Server for now ?

Patrice

--

"Paperback Writer" <ne*********@gmail.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
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 ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx


Nov 19 '05 #3

P: n/a
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

--

"Paperback Writer" <ne*********@gmail.com> a écrit dans le message de
news:uv**************@TK2MSFTNGP09.phx.gbl...
for example: 134.562,56

--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
"Patrice" <no****@nowhere.com> escreveu na mensagem
news:O0**************@TK2MSFTNGP14.phx.gbl...
How do you pass this value back to SQL Server for now ?

Patrice

--

"Paperback Writer" <ne*********@gmail.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
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 ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx



Nov 19 '05 #4

P: n/a
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

"Paperback Writer" <ne*********@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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 ?
--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx

Nov 19 '05 #5

P: n/a
"Paperback Writer" <ne*********@gmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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"
Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.