Derby
  1. Derby
  2. DERBY-518

Data type mismatch error for boolean to DECIMAL conversion in J2ME

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.1.2.1, 10.2.1.6
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
      J2ME/CDC/Foundation Profile

      Description

      The test jdbcapi/resultset.java gives the following error when run in J2ME/CDC/FP :

      Testing nullif(?,DECIMAL(10,5)) with setBoolean
      ERROR XCL12: An attempt was made to put a data value of type 'boolean' into a data value of type 'DECIMAL'.

      I found that setValue(boolean) is not implemented in BigIntegerDecimal, which is the class used for DECIMAL in J2ME. This is implemented in SQLDecimal and a similar implementation can be provided in BigIntegerDecimal.

      On looking at the setValue methods in these classes, I also found that setValue(Object) is implemented in SQLDecimal but not in BigIntegerDecimal.

      1. ASF.LICENSE.NOT.GRANTED--derby-518_2.diff
        13 kB
        Deepa Remesh
      2. ASF.LICENSE.NOT.GRANTED--derby-518_2.status
        0.5 kB
        Deepa Remesh
      3. derby-518_3.diff
        13 kB
        Deepa Remesh

        Issue Links

          Activity

            People

            • Assignee:
              Deepa Remesh
              Reporter:
              Deepa Remesh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development