2011年10月13日 星期四

JDBC String 的參數列表

JDBC String 的參數列表
用到 zeroDateTimeBehavior 所以找到這個東東
因為資料庫填的日期是0000-00-00沒有辦法給Java 的Date類別轉換
這個參數有三種值 exception, round, convertToNull分別是丟出例外, 轉換成0000-01-01, 回傳null三種

What should happen when the driver encounters DATETIME values that are composed entirely of zeros (used by MySQL to represent invalid dates)? Valid values are "exception", "round" and "convertToNull".

http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html