How to set empty values in some of the adam attributes RRS feed

  • Question

  • User238037111 posted

    In following ADAM attributes, I dont have values for each adam recors. Whenever I try to add user where information is not available it wont allow me. Here are fields


    I am setting value in code mentioned below

    userAdd.Properties["displayName"].Value = sFirstName + " " + sLastName;
    userAdd.Properties["givenName"].Value = sFirstName;
    userAdd.Properties["sn"].Value = sLastName;
    userAdd.Properties["title"].Value = sTitle.ToString().Trim(); <-- If I dont have any value in Stitle field it give me following errror -->

    The attribute syntax specified to the directory service is invalid. (Exception from HRESULT: 0x8007200B)

    Let me know how do I resove this



    Monday, August 3, 2009 2:48 PM

All replies

  • User-2009597737 posted

    Maybe you should check if the value is blank/null before setting the AD attribute.

    Tuesday, August 4, 2009 2:21 PM