AOB
Registered User.
- Local time
- Today, 22:25
- Joined
- Sep 26, 2012
- Messages
- 633
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?
Probably asking a lot but I figure if you don't ask...
Cheers!
Al
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?

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