I'm setting up a MySQL data source. For legacy compatibility I need to handle dates with the value 0000-00-00.
I can use the connection string zeroDateTimeBehavior=convertToNull to active that. However, this results in a rather odd error:
java.sql.SQLException: The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull ' is not in this set.
Help!
Read this. http://dev.mysql.com/doc/refman/5.1/en/datetime.html
Pay attention to the supported range. Decide what you want to do with dates outside that range.
Thanks Dan. I could replace all the date fields with null, although that would conflict with a legacy system.
zeroDateTimeBehavior is a valid connection property and the error message confirms that. My question is really why there is an error when the value I'm passing is clearly one of the values in the acceptable set.
David.
I am also seeing that error:
Connection verification failed for data source: pcbcrm
java.sql.SQLException: The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull ' is not in this set.
The root cause was that: java.sql.SQLException: The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull ' is not in this set.
It has been reported as part of bug here
https://bugbase.adobe.com/index.cfm?event=bug&id=3197321
Hopefully Adobe fixes it soon.
North America
Europe, Middle East and Africa
Asia Pacific