Click here to Skip to main content
11,488,212 members (80,839 online)
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 20: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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 489
1 OriginalGriff 353
2 Advay Pandya 155
3 Mehdi Gholam 145
4 Sascha Lefèvre 135
0 Sergey Alexandrovich Kryukov 9,308
1 OriginalGriff 8,352
2 Sascha Lefèvre 3,334
3 Maciej Los 2,956
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 20 Apr 2012
Copyright © CodeProject, 1999-2015
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