Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# MVC3 ASP.NET4.0
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 19-Apr-12 19:19pm
Comments
Sebastian T Xavier at 20-Apr-12 1:24am
   
can you show us the code?
Rate this: bad
good
Please Sign up or sign in to vote.

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)..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

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);
...
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.140821.2 | Last Updated 20 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100