读书人

请教在JAVA里面如何写更新代码

发布时间: 2012-03-08 13:30:13 作者: rapoo

请问在JAVA里面怎么写更新代码?
Document提供了更新的方法了的么,新人接触这个时间不长,也就会查询和添加。。


所以能有个例子更好了..谢谢各位了!!在线等!!

[解决办法]
接分的..
DocumentCollection docs=d.getAllDocuments();
boolean b=false;
for (int i = 1; i <= docs.getCount(); i++) {
Document dd=docs.getNthDocument(i);
if(dd.getItemValueString("userName").equals("王新武")){
dd.remove(false);
b=true;
}
}
if(b==true){
System.out.println("删除成功");
}else{
S

读书人网 >行业软件

热点推荐