This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
It looks dataview is using double for DECIMAL now. It causes a problem that it can not store exact value over 16 digit. org/netbeans/modules/db/dataview/util/DBReadWriteHelper.java: case Types.DECIMAL: numberObj = (valueObj instanceof Number) ? (Number) valueObj : new BigDecimal(valueObj.toString()); ps.setDouble(index, numberObj.doubleValue()); break; The above codes should be following. Another point is, it's better to use Long for BIGINT. case Types.BIGINT: numberObj = (valueObj instanceof Number) ? (Number) valueObj : new Long(valueObj.toString()); ps.setLong(index, numberObj.doubleValue()); break; case Types.DECIMAL: case Types.NUMERIC: BigDecimal bigDec = new BigDecimal(valueObj.toString()); ps.setBigDecimal(index, bigDec); break; This issue has been reported from community user in Japan.
Masaki, please don't use P2 as default priority for each new report. Consider and justify why you realized it as P2. I don't see it as P2 at all. It's one of many problems in DB module, nothing more. Moreover, the code you mentioned in the report is in NB65 sources too. No regression in this code.
Hi Jiri, I see. Thank you for the evaluation.
http://hg.netbeans.org/core-main/rev/c39811a65709 Thank you for providing the fix.
Integrated into 'main-golden', will be available in build *201205290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c39811a65709 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #166929: Can not store correct value for DECIMAL