It worked. Thanks a million. Hopefully my hair won't take to long to grow back.
I bought your book last week from amazon. I currently reading chapter 3. Actually took your example code. See 3.13.vb. Isn't that funny? I thought DirectoryServices was a wrapper to ADSI? Why do you say they are not equivalent? Y They aren't equivalent. Try using the .Value property instead: user.Properties("description").Value = xxxx Description is a funny property in AD in that the schema says that it allows multiple values, but the DS itself will only allow it to contain a single value for backward compatibility with previous DS APIs. That might be part of the problem here. In any event, it is generally always good practice to use the .Value property to set a single value. There is more info on this in ch 6 of our book (www.directoryprogramming.net). Joe K. ----- Original Message ----- From: "AD" <[EMAIL PROTECTED]> To: <ActiveDir@mail.activedir.org> Sent: Thursday, December 28, 2006 10:13 AM Subject: [ActiveDir] DirectoryServices vb.net is broken. I have a user with no description attribute. Anyone know why this works? User.Invoke("put", New Object() {"description", txtBxNewDescription.Text}) User.commitChanges but this doesn't User.Properties("Description").Add(txtBxNewDescription.Text) User.commitChanges I get the following error message. ComError {"A constraint violation occurred. (Exception from HRESULT: 0x8007202F)"} System.DirectoryServices.DirectoryServicesCOMException Thanks Yves St-Cyr List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.activedir.org/ma/default.aspx List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.activedir.org/ma/default.aspx
<<winmail.dat>>