ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Introduction to System.DirectoryServices, Part 1
Subject:   Declaration expected
Date:   2005-07-28 14:04:37
From:   DavidSlate
I've been able to get some of the code to work but I get this error with objSearch underlined...
any ideas?

Imports System.DirectoryServices
Public Class Form1
Inherits System.Windows.Forms.Form

Dim objSearch As New DirectorySearcher

objSearch.SearchRoot = New DirectoryEntry("LDAP://dc=xxxxx,dc=com")
objSearch.Filter = "(&(objectclass=user)(objectcategory=person))"
objSearch.SearchScope = SearchScope.Subtree