Anonymous_User Absent Member.
Absent Member.
405 views

Can't update boolean attribute

I'm attempting to update a boolean attribute in the directory and can't
seem to figure it out - I get an invalid attribute syntax. When updating a
string attribute the following works just fine:

LdapAttribute LastName = new LdapAttribute("sn",pv.PropertyValue.ToString());
modList.Add(new LdapModification(LdapModification.REPLACE, LastName));

BUT

sbyte[] Age = new sbyte[] { XXXXX };
LdapAttribute Over18 = new LdapAttribute("Over18", Age);
modList.Add(new LdapModification(LdapModification.REPLACE, Over18));

doesnt work -
in place of XXXXX I've tried a number of different items , but keep hitting
the error.

Any ideas?

thanks!

Eric
Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Can't update boolean attribute

Never mind - I'm a moron.

Eric


> I'm attempting to update a boolean attribute in the directory and can't
> seem to figure it out - I get an invalid attribute syntax. When updating a
> string attribute the following works just fine:
>
> LdapAttribute LastName = new LdapAttribute("sn",pv.PropertyValue.ToString());
> modList.Add(new LdapModification(LdapModification.REPLACE, LastName));
>
> BUT
>
> sbyte[] Age = new sbyte[] { XXXXX };
> LdapAttribute Over18 = new LdapAttribute("Over18", Age);
> modList.Add(new LdapModification(LdapModification.REPLACE, Over18));
>
> doesnt work -
> in place of XXXXX I've tried a number of different items , but keep hitting
> the error.
>
> Any ideas?
>
> thanks!
>
> Eric


0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.