12,699,531 members (34,603 online)
Rate this:
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!!!
Posted 19-Apr-12 20:19pm
Sebastian T Xavier 20-Apr-12 1:24am

can you show us the code?

Rate this:

## Solution 1

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)..
Rate this:

## Solution 3

If your code is like the following :
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:
...
decimal d = 9;
int i = 1;
method(i, ref d);
...

Top Experts
Last 24hrsThis month
 OriginalGriff 170 ppolymorphe 125 Kornfeld Eliyahu Peter 95 Dave Kreskowiak 90 Afzaal Ahmad Zeeshan 50
 OriginalGriff 3,931 Peter Leow 2,278 ppolymorphe 1,882 Mika Wendelius 1,753 Jochen Arndt 1,479