jaws1021
asked on
my value rounds up
dim ierr_amt as decimal
mytxtErr_Amt = CType(item.FindControl("tx tERR_AMT") , TextBox)
ierr_amt = mytxtErr_Amt.Text 'this point ierr_amt is 8534.88
insert statement
ByVal ierr_amt As Decimal
aParms(3) = New SqlParameter("@ierr_amt", SqlDbType.Decimal)
If ierr_amt = Nothing Then
aParms(3).Value = DBNull.Value
Else
aParms(3).Value = ierr_amt 'this point also 8534.88
end if
When I go check database it is value is rounded up and saved that way 8435
mytxtErr_Amt = CType(item.FindControl("tx
ierr_amt = mytxtErr_Amt.Text 'this point ierr_amt is 8534.88
insert statement
ByVal ierr_amt As Decimal
aParms(3) = New SqlParameter("@ierr_amt", SqlDbType.Decimal)
If ierr_amt = Nothing Then
aParms(3).Value = DBNull.Value
Else
aParms(3).Value = ierr_amt 'this point also 8534.88
end if
When I go check database it is value is rounded up and saved that way 8435
what is the EXACT data type in the table? note also the precision and scale, you might have a 0 scale (hence 0 digits after the comma, hence rounding!)
Check the data type of that column in the database. Is it int or bigint?
ASKER
it is MONY:numeric(10, 2)
ASKER
I still didn't figure this out, what I need to do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I add that still a problem
can you show then the command/procedure/insert statement that you use?