Hi, folgendes problem beim Insert:
Es handelt sich um eine H2 Datenbank, die Tabelle STATISTICS ist wie folgt aufgebaut:
Code:
org.h2.jdbc.JdbcSQLException: Datenumwandlungsfehler beim Umwandeln von 2009-05-29 10:47:28.456
Data conversion error converting 2009-05-29 10:47:28.456 [90021-73]
at org.h2.message.Message.getSQLException(Message.java:103)
at org.h2.value.Value.convertTo(Value.java:640)
at org.h2.command.dml.Insert.update(Insert.java:87)
at org.h2.command.CommandContainer.update(CommandContainer.java:69)
at org.h2.command.Command.executeUpdate(Command.java:198)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:137)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:126)
Code:
statement="INSERT INTO STATISTICS VALUES ("+sid+","+uid+",'"+emailtyp+"',"+errors+",'"+timestamp+"','"+isEdi+"')";
conn.prepareStatement(statement).executeUpdate();
Es handelt sich um eine H2 Datenbank, die Tabelle STATISTICS ist wie folgt aufgebaut:
Code:
H2 DB In meinem Java-Code
sid=integer(10) int
uid=integer(10) int
emailtyp=varchar(30) String
errors=integer(10) int
timestamp=timestamp(23,10) java.sql.timestamp
isEdi=boolean(1) boolean