MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » ORA-01008: 并非全部变量都已关联

ORA-01008: 并非全部变量都已关联

www.MyException.Cn  网友分享于:2013-11-30  浏览:504次
ORA-01008: 并非所有变量都已关联
各位大虾
        修改的时候一直出现这个问题,帮忙看下~~~~
        代码如下


sql.append( "   update   TB_INF_MODELTESTINFO   set   C_EMPOID=? "+ ", ")
.append( "   C_OPERATETIME=? "+ ", ")
.append( "   C_OPERATOR=? "+ ", ")
.append( "   C_DATE=? "+ ", ")
.append( "   C_SUMMARIZE=? "+ ", ")
.append( "   C_MARK=? "+ ", ")
.append( "   C_UNITIDEA=? "+ ", ")
.append( "   C_COMMITTEEIDEA=? "+ ", ")
.append( "   C_GROUPIDEA=? "+ ", ")
.append( "   C_MODEDUTYID=? ")
.append(
"   where   C_OID_MODELTESTINFO=? ");
try   {
java.sql.PreparedStatement   state   =   this.getSession().connection().prepareStatement(sql.toString());
state.setLong(1,   vo.getEmpID());
state.setTimestamp(2,   new   java.sql.Timestamp(curDate.getTime()));
state.setLong(3,   curEmpID);
state.setTimestamp(4,   new   java.sql.Timestamp(vo.getDate().getTime()));
state.setString(5,   vo.getSummarize());
state.setInt(6,   vo.getMark());
state.setString(7,   vo.getUnitIdea().getCode());
state.setString(8,   vo.getCommIdea().getCode());
state.setString(9,   vo.getGroupIdea());
state.setLong(10,   vo.getModelDutyID());
state.setLong(11,   vo.getOid());

state.executeUpdate(sql.toString());

------解决方案--------------------
把执行的sql log出来,我估计你这边有空值导致的

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有