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出来,我估计你这边有空值导致的