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?

3
  • You told it (or perhaps the default is) to use four decimal places. Possibly useful: How to store decimal values in SQL Server? Commented Apr 17, 2016 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? Commented Apr 17, 2016 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? Commented Apr 17, 2016 at 18:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.