6 messages in com.mysql.lists.javaRe: Cannot convert value '2004-08-13 ...| From | Sent On | Attachments |
|---|---|---|
| Jeff Mathis | 21 Sep 2004 13:10 | |
| Rhino | 21 Sep 2004 13:51 | |
| Jeff Mathis | 21 Sep 2004 13:56 | |
| Mark Matthews | 21 Sep 2004 23:26 | |
| Jeff Mathis | 22 Sep 2004 07:53 | |
| Mark Matthews | 23 Sep 2004 06:48 |
| Subject: | Re: Cannot convert value '2004-08-13 13:21:17.' from column 3 to TIMESTAMP.![]() |
|---|---|
| From: | Jeff Mathis (jmat...@predict.com) |
| Date: | 09/21/2004 01:56:01 PM |
| List: | com.mysql.lists.java |
is the format something I can control? The InnoDB engine stores timestamps incorrectly from versions 4.1 - 4.1.3; I'm wondering if this is the problem.
Nevertheless, the fact that Statements and PreparedStatements work just fine indicate to me that perhaps there is a bug with ServerPreparedStatements.
jeff Rhino wrote:
----- Original Message ----- From: "Jeff Mathis" <jmat...@predict.com> To: <ja...@lists.mysql.com> Sent: Tuesday, September 21, 2004 4:10 PM Subject: Cannot convert value '2004-08-13 13:21:17.' from column 3 to TIMESTAMP.
Hello All,
I was doing some performance comparisons, and was trying to use the ServerPreparedStatements. However, I immediately got this exception: . . . Caused by: java.sql.SQLException: Cannot convert value '2004-08-13 13:21:17.' from column 3 to TIMESTAMP. at com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:6034) at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:6059) at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:2199) . . .
If I use Stements or PreparedStatements, there is no such error. anyone else seen this problem?
using Connector/J 3.1.4 with mysql server 4.1.3 on Solaris.
I believe that the separator between the hour components in a timestamp must be a period, not a colon, i.e. the String representation of your timestamp needs to be '2004-08-13 13.21.17' *not* '2004-08-13 13:21:17'.
Rhino
-- Jeff Mathis, Ph.D. 505-955-1434 Prediction Company jmat...@predict.com 525 Camino de los Marquez, Ste 6 http://www.predict.com Santa Fe, NM 87505




