My problem is the following:
I've got a mysql-table with fields of the type DATETIME. These have the default value "0000-00-00 00:00:00". When I now call rs.getXXX() on one of these columns with their default value, I get the following SQL error:
java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column xx to TIMESTAMP.
at com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:5639)
at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:5667)
at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5320)
at com.mysql.jdbc.ResultSet.getObject(ResultSet.java:4433)
[some more lines]
maybe this error also occurs with DATE fields '0000-00-00'. Didn't tested it yet.
any ideas for a good solution? At the moment I catch the exception, check if it looks like this one and then "manually" use '0000-00-00 00:00:00'. But this really isn't a good solution for me. ;)
mfg kai
(sorry for my bad english :D )
Message was edited by:
kai_schwierczek