ModifyRequest modReq = new ModifyRequestImpl();
modReq.setName( personDn );
modReq.replace( SchemaConstants.SN_AT, "sn_" + i );
ModifyResponse resp = nc.modify( modReq );
ResultCodeEnum rc = resp.getLdapResult().getResultCode();
if( rc != ResultCodeEnum.SUCCESS )
{
System.out.println( "Error modifying " + personDn + " on the server " + nc.getConfig().getLdapHost() + ":" + nc.getConfig().getLdapPort() + " with result code " + rc );
}