zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0
在JDBC中,我开始的失败的方案是:

(1)
        buf.append(new java.sql.Timestamp(new Date().getTime()));
        buf.append(",");

(2)
                buf.append(new Date());
                buf.append(",");

(3)
               buf.append(new Timestamp(System.currentTimeMillis());
               buf.append(",");

(4)
                buf.append(new java.sql.Date(System.currentTimeMillis()));
                buf.append(",");


最后正确的方案是
                       
        buf.append("'");
        buf.append(new java.sql.Timestamp(new Date().getTime()));
        buf.append("'");
        buf.append(",");



|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2009-06-08 14:35 zhyiwww 阅读(1746) 评论(0)  编辑  收藏 所属分类: databasePostgres

只有注册用户登录后才能发表评论。


网站导航: