db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate McKie" <nate.mc...@asolutions.com>
Subject RE: Inconsistencies in PreparedStatement.setFloat/setDouble
Date Fri, 10 Sep 2004 13:17:39 GMT

> Since the code cannot be run, can you give a summary 
> of what values you sent to the database and what was retrieved. 
> For both float and double methods. Preferably printing the 
> value of 'preInsert' and 'postInsert'.

Summary of tests:

If setFloat() is used in the insert statement, 
and getFloat() is used to retrieve the inserted data:
-----------------------------------------------------
0.265 is returned as 0.264	WRONG
0.264 is returned as 0.263	WRONG
0.263 is returned as 0.263 	RIGHT

If setDouble() is used in the insert statement, 
and getFloat() is used to retrieve the inserted data:
-----------------------------------------------------
0.265 is returned as 0.264	WRONG

If setDouble() is used in the insert statement, 
and getDouble() is used to retrieve the inserted data:
-----------------------------------------------------
0.265 is returned as 0.265	RIGHT

That what you were looking for?

-Nate


Mime
View raw message