Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

A BIND connect to LDAP using ADODB

0

Hi All 

This is a bit of a fringe area but some one may have an answer. 

I have been using an anonomous bind to connect to a development LDAP. This has recently been changed to no longer accept anonynous binds. I have a user and PW I can use but am not sure hoe to get it into the select or any other paramater. Here is a code snippet.

Set cnn = CreateObject("ADODB.Connection")
Set cmd = CreateObject("ADODB.Command")
Set rs = CreateObject("ADODB.Recordset")
cnn.Open "Provider=ADsDSOObject"
cmd.CommandText = "SELECT uid, telexNumber from 'LDAP://extuserdirectorydev1:389/ou=Clients,ou=People,ou=e-Service-VOS,dc=ssi,dc=govt,dc=nz'" & _
                 " WHERE title = 'client-full'" & _
                 " order  by telexNumber desc"              
cmd.ActiveConnection = cnn 
Set rs = cmd.Execute
Answer
Discuss

Answers

0

Hello k1,

Long time no see. Your question isn't really about Excel and it isn't really what I know about either but I looked around a little and came up with this. It may be quite far from what you need but perhaps you will find some ideas there that you will know how to put to good use.

Good luck!

Discuss

Discussion

Thanks Variatus. nice of you to remember me.
I still look at this site from time to time but am never quick enough to get in any answers that would more aceptable than those already provided.
I have cast about various sites and have learnt that what I thought I knew about LDAP is considerably smaller than what I don't know. As I said it is verymuch on or over the fringe of XL VBA.
Thanks for all your efforts on this site over the years. 
k1w1sm (rep: 197) May 6, '21 at 10:37 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login