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

neha_prasad

New member
Joined
Sep 26, 2011
Messages
1
Programming Experience
Beginner
Hello,

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.....
 
my guess is that you have too many 0's after the decimal. ex... access only allows up to 15 decimal places. this might
not be your solution but I would change the "Amount" field type to Text or nvarchar and then if i needed to use it
in my code as a numeric value i would use val(). you can set the decimal places using string formatting ex...

VB.NET:
Val([whatever].ToString("0.000000000"))
 
Last edited:
Back
Top