[ http://issues.apache.org/jira/browse/DERBY-2073?page=comments#action_12449403 ] Daniel John Debrunner commented on DERBY-2073: ----------------------------------------------
Just an FYI on some code in the repro case (thanks for that). DriverManager.registerDriver((Driver) Class.forName(JDBC_DERBY_DRIVER).newInstance()); There is no need for applications to call DriverManager.registerDriver, that method is intended for a driver to register itself. Calling this method from an application can cause unexpected failures. To load the Derby driver, the correct code is simply: Class.forName(JDBC_DERBY_DRIVER).newInstance(); > Inserting BigDecimal value in PreparedStatement into double column loses > fractional digits > ------------------------------------------------------------------------------------------ > > Key: DERBY-2073 > URL: http://issues.apache.org/jira/browse/DERBY-2073 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.1.2.1 > Environment: windows xp > Reporter: Lukasz P > Attachments: BigDecimalProblemTester.java > > > 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
