"The numerical value is too large to fit into a 96 bit decimal."

"The numerical value is too large to fit into a 96 bit decimal."

Hi;

I have an issue in which I am binding a table from sql by executing query

"select * from test"

in this table the data are in this format :

Id            Name             Details
1            dinesh    987654312.00000000000000000000
2            sandeep   987654312.00000000000000000000
3             neha      987654312.00000000000000000000
4             sunil     987654312.00000000000000000000

but wen i am binding it then its displaying error as
"The numerical value is too large to fit into a 96 bit decimal."

The Datatype of COLUMNS of TABLE IS AS follows:-
Name     DataType       Allow NULL
Id      nchar(10)       Checked
Name    nchar(10)       Checked
Amount  numeric(38, 20) Checked

Code which I have written is as follows:-
Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(tmpquery, ConnectionString)

Dim dt As New DataSet
da.Fill(dt)

Please help me.....

The Reddest
09/27/2011 - 09:39

The "Amount" data type has too much precision to fit in any .NET number type. numeric(38,20) has 38 numbers before the decimal and 20 after. .NET's decimal is the highest precision number that is available, and it cannot represent that much information. Reduce the precision of the "Amount" column.

reply

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.