Click here to Skip to main content
15,886,030 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how to solve this problem
actually i want to insert numeric(18,0) value in sql server and i am passing decimal value but getting this error ?
how to solve this problem plz help me!!!
thanks in advance
Posted
Comments
Sebastian T Xavier 20-Apr-12 1:24am    
can you show us the code?

Hi,

numeric(18,0) means

a number that has 18 (or less) digits before the decimal and 0 digits after the decimal.

Please check, how many digits are there after decimal in your value (That you are passing for insertion)..
 
Share this answer
 
If your code is like the following :
C#
public void method(int i, ref decimal d)
{
...
}

Then you must call this method like the following so you wouldn't get the error you mentioned:
C#
...
decimal d = 9;
int i = 1;
method(i, ref d);
...
 
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