lc.Modify(entry.DN, new LdapModification(LdapModification.REPLACE, new LdapAttribute("mDBUseDefaults", "FALSE")));//必须大写

对于布尔类型的属性值,必须要大写,否则报错;

 if (entry.getAttribute("mDBStorageQuota") != null)
                                        lc.Modify(entry.DN, new LdapModification(LdapModification.DELETE, new LdapAttribute("mDBStorageQuota")));

在执行删除操作的时候,必须要先判断有无该属性,否则执行失败;

 lc.Modify(entry.DN, new LdapModification(LdapModification.REPLACE,
                                        new LdapAttribute("mDBStorageQuota","");//ERROR

执行更新操作,需要注意的是,更新的值必须不能为空,否则报错。也就是说,要是清空某一个属性值,只能是执行DELETE删除该属性;

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
  • 2021-09-21
  • 2021-09-12
  • 2022-12-23
猜你喜欢
  • 2019-12-29
  • 2021-08-01
  • 2021-09-26
  • 2022-12-23
  • 2021-10-23
  • 2021-12-23
  • 2022-01-18
相关资源
相似解决方案