I'm having a problem where the JDBC converts the date 2004-12-00 to 2004-11-30 when retreaving it with ResultSet.getString();
I read somewhere that if you put noDatetimeStringSync=true to the JDBC url it should cure this problem and pass the date string untouched. However, this is not working for me?! There is no effect if it's either true or false.
I'm using DBCP as a connection pool and my configuration xml has this:
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/mydb?autoReconnect=true&zeroDateTimeBehavior=convertToNull&noDatetimeStringSync=true</value>
</property>
The JDBC driver version is 5.0.4 and the actual db is 5.0.22.
Funny thing is that I extracted the JDBC jar file and looked the com/mysql/jdbc/configs/3-0-Compat.properties file and it has the line "noDatetimeStringSync=true" already set to true? The default according to the manual id false, so what's going on here? ;)
Thanks for any replies!