后台打印错误:java.sql.SQLException: ORA-01008: 并非所有变量都已关联,谁碰到这种问题??如何解决??
我的类的方法为:     public boolean setCommentFlowFlag (String value,String modid){
               boolean flag=false;
                       String sql="update module set commentflag=? where moduleid=?";
                       try {
             conn = dbutil.getConnection();      //conn,pst,dbutil已经在类中声明是实例变量
               pst = conn.prepareStatement(sql);
     pst.setString(1, value);
     pst.setString(2,modid);
     int i = pst.executeUpdate(sql);
     if(i!=0)
flag=true;
    return flag;
}
.........省略相关catch,finally语句。
}

解决方案 »

  1.   

    另外,为何我在 PL/SQL输入更新语句"update module set commentflag=‘1’ where moduleid=113"耗时58秒??
    怎么那么长时间??
      

  2.   

    pst.executeUpdate(sql);
    执行这个能返回值吗?
      

  3.   

    可以返回int啊,说明更新了多少条记录,现在主要问题,为和只是更新一条记录就花了很长时间??
    update module set commentflag=‘1’ where moduleid=113"