AD object properties update (set to nothing)

Discussion in 'ASP .Net Security' started by Guest, Jun 14, 2005.

  1. Guest

    Guest Guest

    Hi
    How can we set a property of an AD object to null / nothing / ""

    ie. to remove the existing value from the object's property, I have tried
    using

    String txt1;
    entry.Properties["Street"].Value = txt1;

    if txt1 is "", an error such as invalid attribute syntax will be thrown.

    Any idea to do it?

    TIA
    --
     
    Guest, Jun 14, 2005
    #1
    1. Advertising

  2. Guest

    Guest Guest

    I just got it, simply set it to null !? why can't it be ""?

    <dl> wrote in message news:...
    > Hi
    > How can we set a property of an AD object to null / nothing / ""
    >
    > ie. to remove the existing value from the object's property, I have tried
    > using
    >
    > String txt1;
    > entry.Properties["Street"].Value = txt1;
    >
    > if txt1 is "", an error such as invalid attribute syntax will be thrown.
    >
    > Any idea to do it?
    >
    > TIA
    > --
    >
    >
    >
     
    Guest, Jun 14, 2005
    #2
    1. Advertising

  3. It is just the way it works under the hood with LDAP. You can also use the
    Clear method which is pretty straightforward.

    Joe K.

    <dl> wrote in message news:...
    >I just got it, simply set it to null !? why can't it be ""?
    >
    > <dl> wrote in message news:...
    >> Hi
    >> How can we set a property of an AD object to null / nothing / ""
    >>
    >> ie. to remove the existing value from the object's property, I have tried
    >> using
    >>
    >> String txt1;
    >> entry.Properties["Street"].Value = txt1;
    >>
    >> if txt1 is "", an error such as invalid attribute syntax will be thrown.
    >>
    >> Any idea to do it?
    >>
    >> TIA
    >> --
    >>
    >>
    >>

    >
    >
     
    Joe Kaplan \(MVP - ADSI\), Jun 14, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2aWQ=?=

    Webmatrix: Wizard's UPDATE code does nothing?

    =?Utf-8?B?RGF2aWQ=?=, Sep 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    419
    =?Utf-8?B?RGF2aWQ=?=
    Sep 15, 2004
  2. John Moore

    MySQLdb UPDATE does nothing

    John Moore, Sep 15, 2005, in forum: Python
    Replies:
    1
    Views:
    430
    David Wilson
    Sep 15, 2005
  3. Rowdy
    Replies:
    3
    Views:
    1,079
    Steve Horsley
    Sep 16, 2005
  4. Stefan Berglund
    Replies:
    2
    Views:
    217
    Stefan Berglund
    Oct 20, 2003
  5. Devin Jeanpierre
    Replies:
    2
    Views:
    533
    Devin Jeanpierre
    Feb 14, 2012
Loading...

Share This Page