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
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
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)
Dim dt As New DataSet
da.Fill(dt)
Please help me.....
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.
Add Comment
[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.