Subject Re: TypeConvertionException
Author rrokytskyy
> I 've changed all my getFloat to (float)rs.getDouble and now it
> works. So i think all my values are 'castable'.

double d = rs.getDouble();
float f = (fload)d;

will not throw any exception. BUT! if d > Float.MAX_VALUE, then the
following assertion will fail: d == (double)f. This means, that the
value you have in double is DIFFERENT from the value you have in

I would be very grateful if you could add in your application the
following code and report the results:

try {
float f = rs.getFloat();
} catch(SQLException ex) {
System.out.println("Got SQLException, double value is " +

This will report all such conversion problems and helps us to find a
bug in our driver.


Roman Rokytskyy