Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IADsGroup: Trying to add a user to a group but getting an error in th

Status
Not open for further replies.

PaulinKC

Programmer
Apr 2, 2002
50
US
Hello...

I am in the process of writing an application using VB.Net 2003 for my work that will batch process users from a CSV file. The problem that I am having is with this line of code:

Code:
Imports ActiveDS

Dim grp As IADsGroup
                
                grp = GetObject("LDAP://CN=Domain Admins,DC=DOMAIN,DC=COM")
                grp.Add("LDAP://CN=" & n.FullName & ",OU=Users,OU=Clients,DC=DOMAIN,DC=COM")

The error message that I get is:

System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class)
at WindowsApplication1.Form1.Button1_Click(Object sender, EventArgs e) in C:\SOURCECODE\testapp2\WindowsApplication1\Form1.vb:line 309

What the heck am I doin wrong here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top