Sudheer Bhat wrote:With getInt() or getFloat its not possible. These methods return 0 if the database value is NULL (its documented in the Resultset interface).
It is very much possible. See the
ResultSet.wasNull() method. All what is needed here is to call the
wasNull() method after
getInt()/
getFloat() and re-set obtained value to
null if
wasNull() returns true.