You may need to include typelib references depending on what your doing:
 
    <!-- Active DS Type Library 1.0 -->
    <reference guid="{97D25DB0-0363-11CF-ABC4-02608C9E7553}"/>
    <!-- Microsoft ActiveX Data Objects 2.7 Library -->
    <reference guid="{00000205-0000-0010-8000-00AA006D2EA4}"/>
 
You may need to use Object.Get (for single valued properties) or Object.GetEx (for mutivalued properties), Object.Put (for single valued properties) or Object.PutEx (for mutivalued properties), and then Object.SetInfo (instead of oRs.Update), something like:
 
If Not oRs.BOF Or oRs.EOF Then
  Do While Not oRs.EOF
    Set oObject = GetObject(oRs("ADsPath"))
    With oObject
      .Put "givenname", "John"
      .Put "inititals", "Q."
      .Put "sn", "Public"
 
      .PutEx ADS_PROPERTY_UPDATE, "description",  Array("Human Resources Staff")
      .PutEx ADS_PROPERTY_UPDATE, "otherTelephone", Array("(987) 654-3210","(987) 987-6543")
 
      .SetInfo
    End With
  oRs.MoveNext
  Loop
Else
  '-- empty recordset
End If
 
 

__________________
Todd Povilaitis
LAN Administrator
Huntington Hospital
[EMAIL PROTECTED]
Phone: (626) 397-3392
Fax: (626) 397-2901

-----Original Message-----
From: Creamer, Mark [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 09:13
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] ADO

I’m sorry I didn’t word the question very well…I understand how to get the ADO search to work, per your suggestion. Can I update the value? e.g. objRS.Update or something to that effect?

 

Or do I need a subroutine that builds the user object first?

 

 

<mc>

-----Original Message-----
From: Todd Povilaitis [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 12:06 PM
To:
[EMAIL PROTECTED]
Subject: RE: [ActiveDir] ADO

 

RootDSE() and subtree should do it for you.  Also if you expect to return more than 1000 objects, you should increase the "Page Size" value in your ADO/ADsDSOObject query.

 

__________________
Todd Povilaitis
LAN Administrator
Huntington Hospital
[EMAIL PROTECTED]
Phone: (626) 397-3392
Fax: (626) 397-2901

-----Original Message-----
From: Creamer, Mark [mailto:[EMAIL PROTECTED]
Sent: Friday, December 19, 2003 08:31
To: [EMAIL PROTECTED]
Subject: [ActiveDir] ADO

Do I want to use ADO if I want to search all users in a domain and then alter an attribute based on its current value, or is there a better method? Up to now, I’ve only tried using ADO to return a result set, not modify.

 

The part I’m struggling with is making the search recursive through the whole domain, rather than having to specify a container or OU, and I know in ADO I can specify a subtree as the scope.

 

Thanks!

 

Mark Creamer

Systems Engineer

Cintas Corporation

Honesty and Integrity in Everything We Do

 

Reply via email to