Click here to Skip to main content
12,699,531 members (34,603 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# MVC3 ASP.NET4
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
Sebastian T Xavier 20-Apr-12 1:24am
can you show us the code?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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: bad
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);

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 20 Apr 2012
Copyright © CodeProject, 1999-2017
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