0

I have something like this...

Set rs = ....
rs.Addnew
...
rs.price = 48 --->the type of price field in SQL is DECIMAL(18,4)
...
rs.Update

Just after the update I look at the new row in SQL and in the price column the value now is 480000.0000.

Why is it adding 4 zeroes in the integer part?

dur
  • 15,689
  • 25
  • 79
  • 125
  • You told it (or perhaps the default is) to use four decimal places. Possibly useful: [How to store decimal values in SQL Server?](http://stackoverflow.com/a/813297/1115360) – Andrew Morton Apr 17 '16 at 18:25
  • Does not really makes sense to me. Are you sure you have '48' and not anything else? What happens if you create a recordset on the database? What database are you using? – INOPIAE Apr 17 '16 at 18:31
  • 1
    This sounds like a conflict of regional settings concerning decimal separator (comma versus point). What is the decimal separator character in your locale? – trincot Apr 17 '16 at 18:36

0 Answers0