Is it possible to query LDAP information without VBA? (AC2007) (1 Viewer)

AOB

Registered User.
Local time
Today, 13:17
Joined
Sep 26, 2012
Messages
615
Hi guys,

General question - title pretty much covers it; does anybody know if it's possible to query Active Directory without having to resort to VBA / ADO recordsets / looping etc.?

I can pull the data via VBA no problem but that just gives me an ADO Recordset 'in memory' - I need the results in a table in the DB so I can join them onto other tables and produce a complete recordset. The only way to achieve this, that I am aware, is to loop through each record in the returned set and add them to the table one by one. Potentially tens of thousands of records. Lot of looping!

The other issue is that the criteria for retrieving the data is based on a user list held in one of my tables. So to generate the command text for the query, I have to read all those values and construct the string, parameter by parameter. Again, potentially tens of thousands of records. Lots more looping!

Thus parsing the string, running the query and then writing the results back to a table, all via VBA, seems horribly inefficient?

So I'm just wondering if there is any way one can set up an LDAP data source (DSN?) and have Access just hook into it and query it, ideally with a join to the existing tables (to restrict the results / define the criteria etc.), so that it can just be done via SQL? :confused:

Probably asking a lot but I figure if you don't ask...

Cheers!

Al
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 22:17
Joined
Jan 20, 2009
Messages
12,851
Access cannot do it.

However MS SQL Server has ADSI capability and it could probably be set up to present the data in such a way that Access could link to it.
 

AOB

Registered User.
Local time
Today, 13:17
Joined
Sep 26, 2012
Messages
615
Thanks guys

Minty, I found that same thread during my web trawling but it didn't lead me down any appropriate paths - but thanks for sharing!

Galaxiom, I'll look into that!
 

Users who are viewing this thread

Top Bottom