我有一种方法可以将特定用户搜索到 ADAM。
'set up the LDAP entry object
objEntry = New DirectoryEntry("LDAP://" & m_strLDAPServer & ":" & m_strLDAPPort & "/" & m_strLDAPEntry)
is the default but it must be set explicitly so that the props array can be passed in
objSearcher = New DirectorySearcher(objChild, "(objectClass=*)", strProps)
objSearcher.SearchScope = SearchScope.Base
objSearcher = New DirectorySearcher(objChild, "(objectClass=*)", strProps)
objSearcher.SearchScope = SearchScope.Base
'carry out the search
Try
objResult = objSearcher.FindOne()
Catch
objResult = Nothing
End Try
我想从 ADAM SQL 获取结果:Like '%strUserName%',但我发现只有方法FindOne()只搜索完整字符串“strUserName”,但它不执行 SQL Like 操作。任何想法我怎样才能像 SQL LIKE 一样搜索?