"Drew Burchett" <dr***@brtc.netwrote in message
news:uJ**************@TK2MSFTNGP04.phx.gbl...
Yes. I've used ADSI edit to go into the Active Directory and see for
certain that the property exists.
Also, in stepping through the code, I found that setting the property to
empty or calling Clear either one will remove the property, but it appears
that it never gets saved when I call CommitChanges. Not sure what would
be causing that since CommitChanges never throws an exception and won't
return any error codes.
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:eJ*************@TK2MSFTNGP03.phx.gbl...
>"Drew Burchett" <dr***@brtc.netwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
>>Thank you, but that didn't seem to work either.
"Colby Africa" <co**********@gmail.comwrote in message
news:29**********************************@y5g200 0hsf.googlegroups.com...
How about de.Properties["telephoneNumber"].Clear?
Colby
Are you sure that this (optional) property exists, you cant change the
value of a non-existing property, you have to add it first like this:
de.Properties["telephoneNumber"].Add(""); // add property and set it's
value to an empty string.
Willy.
Ok I see, the thelephoneNumber cannot be an empty string, *empty* strings
(strings with 0 length) are not valid attribute in AD, that means that when
you set a value to "" , that the property gets deleted.
So, you need to set the value to a valid number or set it to a single space
" " or whatever value that is indicative for a non valid number. Much better
IMO is to delete the property if no value exists for the property.
Willy.
,