你可以看看jdk1.3的文档:
当我们修改已有的列值(第5行的name列)时:
rs.absolute(5); // moves the cursor to the fifth row of rs
rs.updateString("NAME", "AINSWORTH"); // updates the 
          // NAME column of row 5 
rs.updateRow(); // updates the row in the data source当我们新增一行时:
rs.moveToInsertRow(); // moves cursor to the insert row
rs.updateString(1, "AINSWORTH"); //updates the first column of the insert row  
rs.updateInt(2,35); // updates the second column 
rs.updateBoolean(3, true); // updates the third column
rs.insertRow();
rs.moveToCurrentRow();

解决方案 »

  1.   

    我是这样做的呀!可是就是不行但是用变量代替就可以,如:
    ......
    int aa=35; 
    rs.updateInt(1,aa);
    .......
    这样做,数据在数据库中就能正确的显示。
    但是直接用 rs.updateInt(1,35);时在数据库中显示的就是不正确的数。
    不知道这是为什么?我认为这是Java的一个Bug!
     
      

  2.   

    rs.updateInt(1,35);后需要执行rs.updateRow();
    难道还不行。
    如果真那样也许就真的是bug了。