Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
which data type for use 4 didgit decimal value like 2.4,11.3,6.11
it's use for store value from Employee Total Experince...

i use decimal(5,2)

--Error
Arithmetic overflow error converting numeric to data type numeric.
Posted
Updated 2-Feb-15 21:48pm
v2
Comments
CHill60 3-Feb-15 5:26am    
What code is producing that error?

Decimal (4,2), which means 4 digits with 2 decimals inclusive.

More info here[^].
 
Share this answer
 
v2
Comments
CHill60 3-Feb-15 5:26am    
Then surely Decimal(5,2) would also work?
Herman<T>.Instance 3-Feb-15 7:28am    
yep. Gives you 3 digits before the point
Herman<T>.Instance 3-Feb-15 7:28am    
Which code leads to:
Arithmetic overflow error converting numeric to data type numeric ?
CHill60 3-Feb-15 7:37am    
That's what I've asked the OP
Herman<T>.Instance 3-Feb-15 7:58am    
I bet the number he want's to store is larger then 3 digits before the point. Maybe the 5,2 is interpreted as ##,###.## in stead of ###.##

Why don't you change it to decimal (8,2). Than you might see the sent value in the databse (percentage done * 100 twice -> 87.5 will then be 875.00).

Maybe the value from a different parameter or object member was sent to the database by accident.
Decimal (5,2) work properly., Thanx for suggestion. guys..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900