rounding off values from a resultset
843854Aug 1 2003 — edited Aug 4 2003Hi,
I need help with the following problem.
I am connecting to a database called Polyhedra using the JDBC-ODBC bridge, and I am selecting certain fields from one of the tables. Some of the fields have decimal numbers stored in them. When I try getFloat(), getDouble() or any datatype for that matter, the values are getting rounded off. It keeps the number as a decimal, but the rounding off isn't even precise - say for example the number is 684.34998734 in the database, I get it using rs.getFloat() as 684.350011.
Can anyone please tell me what the problem might be ?
Thanks in advance.