Reputation: 9794
All,
For a decimal value of 1 billion being retrieved from SQL Server where the associated datatype is Numeric (28,10), I am running into Conversion overflow exception. From MSDN:
The .NET Framework decimal data type allows a maximum of 28 significant digits
I need to clarify if the digits here refer to the binary form or decimal form itself?
Upvotes: 2
Views: 5985
Reputation: 7761
In SQL Server for Numeric and Decimal datatypes, this defines a maximum of 28 decimal digits in total (the precision) with a maximum of 10 decimal places to the right of the decimal point (the scale), thus giving a maximum of 18 dp to the left of the point.
Upvotes: 5
Reputation: 612794
The limitation is imposed by the decimal representation and the 28 significant digits refer to 28 decimal digits.
Upvotes: 3