Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
when we select a record from a table and the value of timestamp field is '0000-00-00 00:00:00', the result of this field is null, that's OK. but when we call wasNull(), is return false.
Description
test code :
public Object getResult(ResultSet rs, String columnName)
throws SQLException {
java.sql.Timestamp sqlTimestamp = rs.getTimestamp(columnName);
if (rs.wasNull())
else
{ return new java.util.Date(sqlTimestamp.getTime()); }}
when the value of the field 'columnName' is '0000-00-00 00:00:00', rs.wasNull() will return false, not true. it is wrong.