[Date Prev][Date Next]
Re: replacing just one value of a multivalue attribute
- To: Jason Millard <firstname.lastname@example.org>, openldap <openldap-software@OpenLDAP.org>
- Subject: Re: replacing just one value of a multivalue attribute
- From: Marc Boorshtein <email@example.com>
- Date: Wed, 3 Aug 2005 22:10:49 -0400
- Content-disposition: inline
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BIjsnperQHX0k7AhUCHzVHK/tvvijRGQ8T9Zk5G7kSr87Eeey2WyBlgiSey7C528NCgLT0JIqA8zjUU641Z5ABQnWy9uoxjUgkOkHaZoKkJMyZXXml3ALcJzu21CGq0IHPICzsxHag7rnj5AiD/s6fq3npf8A9Iz27DsDMOJpAU=
- In-reply-to: <001f01c59898$fa5a9ae0$c901a8c0@dell2800>
- References: <001f01c59898$fa5a9ae0$c901a8c0@dell2800>
1. Please send all support requests to firstname.lastname@example.org.
2. You can not update a single value of an attribute in LDAP the way
you would in an RDBMS. The where clause is used to find the entry to
apply the modify operation on. What you would need to do is delete
and then add the value :
UPDATE ENTRY cn=Me,dc=domain,dc=com DO DELETE SET attrib='oldval' DO
ADD SET attrib='newval' WHERE attrib='oldval'
On 8/3/05, Jason Millard <email@example.com> wrote:
> Hello. I am extremely sorry to write you directly,
> as I probably should have gone directly to the
> Using JDBCLDAP, is possible to update just
> one value inside of a multivalue attribute.
> For example,
> UPDATE ENTRY CN=x,OU=People,DC=ms,DC=com DO REPLACE SET apps='MHCP' WHERE
> I've tried all kinds of possible combinations,
> including the connect string props, EXP_ROWS,
> The only way I can think of accomplishing this
> is by doing a SELECT, finding the exists apps,
> then running through the result set, than doing a
> DO DELETE SET apps followed by the correct
> DO ADD SET apps='' (since apps can be in any
> I've built all the newer code from CVS figuring
> maybe some changes were laying around.
> Anyway, I would also like to say thanks for such
> a great piece of software. I use it all the time.
> -- Jason