Subject | Re: TypeConvertionException |
---|---|
Author | rrokytskyy |
Post date | 2002-04-03T07:28:21Z |
> I 've changed all my getFloat to (float)rs.getDouble and now itdouble d = rs.getDouble();
> works. So i think all my values are 'castable'.
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
float.
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 " +
Double.toString(rs.getDouble());
}
This will report all such conversion problems and helps us to find a
bug in our driver.
Thanks!
Roman Rokytskyy