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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO LDAP Query for SunOne

Status
Not open for further replies.

ClulessChris

IS-IT--Management
Jan 27, 2003
890
GB
We currently use 3 directories (AD, x500 & SunOne authentication directory). I’ve successfully used ADO to connect to the first two directories, but am now having trouble connecting to SunOne. With the first two directories I used and LDAP query i.e <LDAP// ServerAddress / StartNode >.

For SunOne this returns an error “Invalid server path”. This error is not returned if I exclude the StartNode. (so far so good).

I use a filter similar to (I’ve tried a number of variations): “(&(objectclass=busUser)(uid=1234567))”

However I try the filter, or even with no filter I get an empty recordset returned (RS.EOF = True).

I can’t see what I’m doing wrong.

Code:
sBase =  <LDAP// ServerAddress>
sFilter = “(&(objectclass=busUser)(uid=1234567))”
sQuery= sBase & “;” & sFilter & “;ADsPath;SubTree”

Conn.Open “Data Source=Active Directory Provider;Provider=ADsDSOObject”
Set Rs = Conn.Execute(sQuery)
If Rs.EOF = False Then
	Debug.Print Rs.RecordCount

End If

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top