本人做项目时用的是jdbc3.0的rowSet
CachedRowSetImpl crs=new CachedRowSetImpl();
crs.setUrl("jdbc:jtds:sqlserver://localhost:1433/product");
crs.setUsername("sa");
crs.setPassword("");
crs.setTableName("pro_info");
crs.setCommand("select * from pro_info");
crs.execute();
/*  while (crs.next()) {
        int id=crs.getInt("id");
        String name = crs.getString("titleName");
        String type = crs.getString("creater");
        System.out.println(id +"  ,  "+ name +"  ,  "+type);
      }*/
                           我的id设的主键 是自动增长类型的,
就是下面这里插入数据时就报错了,如果把自动增长去掉了就插入成功
                           
 crs.moveToInsertRow();
 crs.updateString(2, "xin");
          crs.updateString(3, "Programing");
 crs.insertRow();
 crs.moveToCurrentRow();
 crs.acceptChanges();
                            所以我想问问如果主键是自动增长类型怎么才能插入数据