Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2073

Inserting BigDecimal value in PreparedStatement into double column loses fractional digits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.2.1
    • 10.3.2.1, 10.4.1.3
    • JDBC
    • None
    • windows xp

    Description

      Create table with column of type double.
      Create a prepared statement which inserts value to this column.
      use preparedStatement#setBigDecimal method of the statement to set value of the column.

      Execution of such statement succeeds, but actual value in db has no fractional digits.

      You can use attached test class to reproduce this problem

      Attachments

        1. NegativeScaleTest.java
          2 kB
          Katherine Marsden
        2. BigDecimalProblemTester.java
          2 kB
          Lukasz P

        Activity

          People

            kmarsden Katherine Marsden
            lukaszp Lukasz P
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: