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

ActiveDirectory data comparision with AccessTable data.

Status
Not open for further replies.

usha2

IS-IT--Management
Apr 5, 2012
1
0
0
US
Hi Experts,
I am working with Active Directory.
I have some data in my access database.
i need to compare these data with Active directory's sAMAccountname.
I used the SQL statement to pull AD information into a recordset.
But unable to compare with access table.
If the recordset from AD is in a temptable then it may be possible to compare with my existing Table.
So am i going in the right direction?
If yes,How can i create table with the recordset(which i pull from Active directory).
Please provide me some (VBA,access 2003) code.
My SQL code is:

Expand|Select|Wrap|Line Numbers objCommand.CommandText = "SELECT sAMAccountName " & _
"FROM 'LDAP://My AD Path"

'Debug.Print objCommand.CommandText
Set rsADSAMAccountName = objCommand.Execute
'Debug.Print rsADSAMAccountName.GetString

strSQL = "CREATE TABLE tempTbl(sAMAccountName varchar(255) NULL)"

In strSQL i am tring to create a tempTable but how can i INSERT my pulled recordset into this Table.
Thank You SoMuch Sir In advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top