数据库里是'2008-12-03 09:33:55'时,
java里取 product.setCreateTime(rs.getTimestamp("createTime")); 就不会有问题,setCreateTime如下:
public void setCreateTime(Timestamp createTime) {
this.createTime=createTime;
}但如果是'0000-00-00 00:00:00'时,就有问题,会抛出SQLException异常
是不是createTime这个字段的值不能是'0000-00-00 00:00:00'???
java里取 product.setCreateTime(rs.getTimestamp("createTime")); 就不会有问题,setCreateTime如下:
public void setCreateTime(Timestamp createTime) {
this.createTime=createTime;
}但如果是'0000-00-00 00:00:00'时,就有问题,会抛出SQLException异常
是不是createTime这个字段的值不能是'0000-00-00 00:00:00'???
解决方案 »
- servlet 调用forward 方法报错[IllegalStateException],求助!
- [急!!!]做了个网站,在本地可以正常运行servlet程序 ,上传后无法访问,大侠们请帮帮我!
- 我的document.execCommand("Undo")和document.execCommand("Redo")为什么不起作用
- 求助立等
- 基于struts架构的java web 程序如何有效的调试程序
- 求每月第一个星期日的具体日期的方法。
- 中文乱码,在线等候.....
- jsp连接SQL server2000的问题!!
- 请问一个eclipse的编译的问题,内详
- 关于JSP中 SISSION 时间限制问题, 120急救!
- struts2部署错误Provider org.apache.xalan.processor.TransformerFactoryImpl not found解决方案
- javascript
所以插入这个时期以前的数据就会出错
yinyuan1987,是这样么?
我自己试的时候是这样的