createStatement(ResultSet.TYPE_SCROLL_SENSITIVE ,ResultSet.CONCUR_UPDATABLE );

解决方案 »

  1.   

    还是出现 ResultSet is not updateable。
      

  2.   

    你或许应该使用updateRow而不是updateString 
    请看有关文档:updateString
    public void updateString(String columnName,
                             String x)
                      throws SQLException
    Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. 
      

  3.   

    String user="sa"; 
    String password=""; 
    String dbs="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=gpy"; 
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");  
    Connection conn= DriverManager.getConnection(dbs,user,password);  
    String sqls="update pubs set cj=?"; prepareStatement preparestatement=conn.createprepareStatement(); 
    ResultSet rs=preparestatement.executeQuery(sqls); 
    while(rs.next()) 

      rs.setString(cj[j]); 
      j++; 
    }