Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Still: parameter value '420.00000' out of range

Author  Topic 

Helloise Smit
Starting Member

22 Posts

Posted - 2008-10-15 : 09:36:42
when i write to my sql db i get the above. i i have a c# app that writes to a db.

my table structure for the above fields are all numeric(8,6).
how come i get THIS error?????
i added to the precision but still not???

can someone explain...
thanks
helloise

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-15 : 09:39:21
because you're leaving only 2 digits (8-6) for value before decimal but have 3 digitscoming in value so make it
numeric(15,6)
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-15 : 09:41:50
DECIMAL(8, 6) means you can store any number that is at most 8 digits INCLUDING 6 digits for decimal part.
That is -99.999999 to 99.999999

420 is greater than 99.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-15 : 09:42:50
with numeric(8,6) , you can have maximum value of 99.999999
Try using numeric(12,2)


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-10-15 : 09:43:26
double

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-15 : 09:43:48
quote:
Originally posted by madhivanan

double

Madhivanan

Failing to plan is Planning to fail


Too slow Madhi
Go to Top of Page
   

- Advertisement -