ASP pgm runs on local server, but it crashes remotely
Hello,
I am running an ASP program on server, but it is having problems when running statement.
“Set oRecordset = oConnection.Execute(strQuery)".
This happens when I try to run it using IE 7 on my desktop.
I can run it successfully from http://localhost/, but it fails on http://testserver:80/. I don't know the reason for it. The code is for both of them is the same. See below:
Set oConnection = CreateObject("ADODB.Connection")
Set oRecordset = CreateObject("ADODB.Recordset")
oConnection.Provider = "ADsDSOObject" 'The ADSI OLE-DB provider
oConnection.Open "Active Directory Provider"
strQuery = "<LDAP://DC=gpo,DC=gov>;(&(objectClass=*)(cn=*" & strUID &"*)
(!(userAccountControl:1.2.840.113556.1.4.803:=2)));
ADsPath,physicalDeliveryOfficeName,company,department,title,sn,cn,name,givenname,mail,mailNickname,
telephoneNumber,OtherTelephone,extensionAttribute1,extensionAttribute2,extensionAttribute3,
extensionAttribute4;subtree"
Set oRecordset = oConnection.Execute(strQuery)
I wish I could get any help from someone. Thanks in advance.