Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - Decimal in SQLServer

 
Thread Tools Search this Thread
Old 06-20-2005, 01:36 PM   #1
Paperback Writer
 
Posts: n/a
Default Decimal in SQLServer

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


  Reply With Quote
Old 06-20-2005, 01:47 PM   #2
Patrice
 
Posts: n/a
Default Re: Decimal in SQLServer

How do you pass this value back to SQL Server for now ?

Patrice

--

"Paperback Writer" <> a écrit dans le message de
news:%...
> 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
>
>



  Reply With Quote
Old 06-20-2005, 02:31 PM   #3
Paperback Writer
 
Posts: n/a
Default Re: Decimal in SQLServer

for example: 134.562,56

--
Please, check my theSpoke:
http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
"Patrice" <> escreveu na mensagem
news:...
> How do you pass this value back to SQL Server for now ?
>
> Patrice
>
> --
>
> "Paperback Writer" <> a écrit dans le message de
> news:%...
>> 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
>>
>>

>
>



  Reply With Quote
Old 06-20-2005, 02:56 PM   #4
Patrice
 
Posts: n/a
Default Re: Decimal in SQLServer

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" <> a écrit dans le message de
news:...
> for example: 134.562,56
>
> --
> Please, check my theSpoke:
> http://www.thespoke.net/MyBlog/dgroh/MyBlog.aspx
> "Patrice" <> escreveu na mensagem
> news:...
> > How do you pass this value back to SQL Server for now ?
> >
> > Patrice
> >
> > --
> >
> > "Paperback Writer" <> a écrit dans le message de
> > news:%...
> >> 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
> >>
> >>

> >
> >

>
>



  Reply With Quote
Old 06-20-2005, 03:14 PM   #5
bradley
 
Posts: n/a
Default Re: Decimal in SQLServer

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" <> wrote in message
news:%...
> 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
>
>



  Reply With Quote
Old 06-20-2005, 05:02 PM   #6
Mark Rae
 
Posts: n/a
Default Re: Decimal in SQLServer

"Paperback Writer" <> wrote in message
news:%...

> 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"


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which SQLServer for 78-702? Mark W MCTS 2 03-02-2010 08:31 PM
how to round off decimal point arianne75 General Help Related Topics 0 06-08-2007 06:17 AM
Hexadecimal to Decimal Paul Ashworth A+ Certification 1 01-05-2005 08:30 AM
Counting In Binary Raymond A+ Certification 13 03-07-2004 06:28 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47