DB2 SQL Error: SQLCODE=-180, SQLSTATE=22007, SQLERRMC=null, DRIVER=3.59.81
代码如下.请问是怎么回事啊?
java.util.Date d = new java.util.Date();
long time = d.getTime();
java.sql.Timestamp ts = new Timestamp(time);
if (nanos > 999999)
nanos = 0;
nanos += 1000;
ts.setNanos(nanos);
time_stamp = ts.toString();
pstmt.setTimestamp(parmCt, ts);
------解决方案--------------------------------------------------------
这个是说你timestamp字符串语法不对啊,检查一下你执行之前完整sql语句的格式
------解决方案--------------------------------------------------------
String your_date = "2012-10-31-15.34.53.003013";
java.util.Date d = new SimpleDateFormat("yyyy-mm-dd-HH.mm.ss.ffffff").parse(your_date);
java.sql.Timestamp t = new java.sql.Timestamp(d);