I can add a property just fine, but I can't 'Edit'http://forums.asp.net/t/308398.aspx/1?I+can+add+a+property+just+fine+but+I+can+t+Edit+Wed, 13 Aug 2003 20:10:07 -0400308398308398http://forums.asp.net/p/308398/308398.aspx/1?I+can+add+a+property+just+fine+but+I+can+t+Edit+I can add a property just fine, but I can't 'Edit' Here is my dilemma. Our company has three levels of user - Exec, Staff, and Nonperson (i.e. an account that represents a role and not an individual - such as 'administrator'). Currently this information is in nested groups - i.e. there is an 'Exec' group that contains 'ny-exec' and 'la-exec', etc. I wrote a script that set the 'employeeType' attribute for members of one of these groups. This code worked fine, here is a snippet: <pre class="prettyprint">Dim type As String = IIf(exec.Checked, &quot;Executive&quot;, &quot;Staff&quot;) Dim individual As DirectoryEntry = root 'Root is the person's DE from a higher level function individual.AuthenticationType = AuthenticationTypes.Secure 'user and pass are valid for an administrator of the domain individual.Username = user individual.Password = pass <b>individual.Properties(&quot;employeeType&quot;).Add(type)</b></pre> The employeeType attribute gets set properly However, when I try to update this feature, by replacing the bolded line above with: <pre class="prettyprint"><b>individual.Properties("employeeType").value=type</b></pre> I get the following error:<b>The Active Directory datatype cannot be converted to/from a native DS datatype</b> Anyone have any advice? 2003-08-13T18:41:45-04:00308487http://forums.asp.net/p/308398/308487.aspx/1?Re+I+can+add+a+property+just+fine+but+I+can+t+Edit+Re: I can add a property just fine, but I can't 'Edit' Not sure what you are passing in for the 'type' variable in your code. The attribute 'employeeType' is of Unicode String, so make sure you are passing a string there. Instead of setting the .Value, try the following and it should fix it for you:<pre class="prettyprint">if(individual.Properties.Contains(&quot;employeeType&quot;)) { individual.Properties(&quot;employeeType&quot;)(0) = type }</pre> 2003-08-13T20:10:07-04:00