Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Getting AD LDAP using LotusScript code.
Feedback Type: Question
Product Area: Domino Server
Technical Area: Application Development
Platform: Windows
Release: 8.5.2
Reproducible: Always

Hi Guys, I need help with quering to AD LDAP.

below is my code, my question is everytime it hit 'objRecordSet.MoveFirst', it comes back with an error "Either BOF or EOF is True, or current record has been deleted".

objRecordSet.RecordCount always return 400 (number of users that we have)

Could you please fix my code?

========================

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")

objConnection.Provider = "ADsDSOObject"
objConnection.Properties("User ID") = "Okio"
objConnection.Properties("Password") = "OkioPass123"
objConnection.Open "Active Directory Provider"

Set objCommand.ActiveConnection = objConnection

strBase = "<LDAP://PAC.OKIOCORP.CORP>;"
strFilter = "(&(objectCategory=*)(objectClass=user));"
strAttributes = "ADsPath,objectClass,cn;”
strLevel = "SubTree”

objCommand.Properties("Page Size") = 100
objCommand.Properties("Timeout") = 30
objCommand.Properties("Cache Results") = False

objCommand.CommandText = strBase & strFilter & strAttributes & strLevel

Set objRecordSet = objCommand.Execute

If ( objRecordSet.RecordCount = 0 ) Then
Call uidoc.FieldSetText("Status","Sorry, User not found ! ")
Exit Sub

Else
MsgBox CStr(objRecordSet.RecordCount) + ":" + CStr(objRecordSet.Fields.Count) ‘return 400:3

objRecordSet.MoveFirst
If Not ( objRecordSet Is Nothing ) Then
MsgBox CStr(objRecordSet.GetString())
While Not objRecordSet.EOF
Msgbox CStr(objRecordSet.Fields(“cn”).Value)

Wend

End If
End If


Feedback number WEBB8KK8FU created by ~Rebecca Elnipuletsi on 08/09/2011

Status: Open
Comments:

Getting AD LDAP using LotusScript c... (~Rebecca Elnipu... 9.Aug.11)
. . Solved (~Rebecca Elnipu... 17.Aug.11)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS