Link to home
Start Free TrialLog in
Avatar of jaws1021
jaws1021

asked on

my value rounds up

dim ierr_amt as decimal
 
 mytxtErr_Amt = CType(item.FindControl("txtERR_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
                                                 
                                                 
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

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?
Avatar of jaws1021
jaws1021

ASKER

it is MONY:numeric(10, 2)
I still didn't figure this out, what I need to do?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I add that still a problem
can you show then the command/procedure/insert statement that you use?