Hi Guys
My Company has joined with another, and we have both got a Win 2003 AD. I want to run a query against their AD via ADO as follows:
This results in an error on line 3 -
(null): An operations error occurred.
I have verified that the account I specify is valid and can execute a query using an LDAP tool.
If I amend the values to run against my own AD, I have no problem.
My Company has joined with another, and we have both got a Win 2003 AD. I want to run a query against their AD via ADO as follows:
Code:
set ons=getobject("LDAP:")
set ocontainer=ons.OpenDSObject( _
"LDAP://Company2DC.company2.com/cn=users,dc=company2,dc=com", _
szUsername, _
szPassword, _
ADS_SECURE_AUTHENTICATION and ADS_SERVER_BIND)
ocontainer.filter=array("user")
for each ouser in ocontainer
wscript.echo ouser.distinguishedname
next
This results in an error on line 3 -
(null): An operations error occurred.
I have verified that the account I specify is valid and can execute a query using an LDAP tool.
If I amend the values to run against my own AD, I have no problem.