[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: empty strings
An attribute must have one or more values. Each value must
conform to the syntax constraints. Some syntaxes, such as
directoryString, disallow empty values.
At 11:52 AM 11/22/00 -0600, Burkule, Sanju wrote:
>I am working on MS LDAP v 3. I have faced the same problem. Whenever you
>assign NULL as the value, with LDAP_MOD_ADD - it returns some error.
Yes, all attributes must have one or more values.
>If you
>try LDAP_MOD_REPLACE with NULL value, for an attribute which is already
>present with some other values - it is successful -
I assume by NULL you mean "no values". If the attribute exists, it
should be deleted. If the attribute does not exist, no error should
occur (in LDAPv3, unlike LDAPv2).
> but the attribute is
>removed from the object
Correct.
> - so a second call doing the same LDAP_MOD_REPLACE
>fails with LDAP_NO_SUCH_ATTRIBUTE.
This is LDAPv2 behavior.
>I am trying to work around this problem, but there seems to be no standard
>way to store a empty string in LDAP.
If the syntax allows it, you should be able to store an empty
string. But note that empty value and no values are two different
cases.