[看完这篇文章的第一感觉是,虽然对于日期类型数据使用得很算顺利,不过作者 提到的一些东西还真不知道。有时候在应用上,不觉得比老外差到那里去。但是, 老外的一个优良
mysql数据库字段为timestamp或datetime类型,在ibatis中不知道怎么配置,[ Cannot convert value '0000-00-00 00:00:00' to TIMESTAMP 今天在用java的JDBC连接mysql数据库时,运行sql语句,报出了 Cannot convert value ’0000-00-00 00:00:00我用java.util.Date,和
java.sql.Timestamp都试过,都不行,不知道怎么解决,有人知道吗?谢谢!
import java.util.Date;
public class Forum {
private Long forumId;
private String name;
private String description;
private int status;
private int forumOrder;
private int catId;
private int topicCount;
private int postCount;
private Long lastPostId;
private String lastPoster;
private Date lastPostDate;
private Long lastTopicId;
CREATE TABLE forum(
forumId bigint(20) unsigned NOT NULL AUTO_INCREMENT,
name varchar(200) DEFAULT NULL,
description varchar(200) DEFAULT NULL,
status int(2) unsigned DEFAULT NULL,
forumOrder int(2) unsigned DEFAULT NULL,
catId bigint(20) unsigned NOT NULL DEFAULT '0',
topicCount bigint(20) unsigned DEFAULT NULL,
postCount bigint(20) unsigned DEFAULT NULL,
lastPostId bigint(20) unsigned DEFAULT NULL,
lastPoster varchar(255) DEFAULT NULL,
lastPostDate datetime NOT NULL,
lastTopicId bigint(20) unsigned DEFAULT NULL,
PRIMARY KEY (forumId)
);[将一个Java对象列表存储在Oracle的BLOB类型中DAO实现中的写法:public void saveDsPPPs(Long dataFileId, ArrayList list) { try { ByteArrayOutputStream bo = new B