Hi All,
<%@ LANGUAGE="VBSCR IPT" %>
<form method="POST">
<%
Dim rstUsers
Dim objDSE, strNamingContex t
Set objDSE = GetObject("LDAP ://rootDSE")
strNamingContex t = objDSE.Get("def aultNamingConte xt")
Set objDSE = Nothing
set rstUsers= CreateObject("A DODB.Recordset" )
rstUsers.Open "SELECT sAMAccountName FROM 'LDAP://CN=Users," & strNamingContex t & "' WHERE objectClass='us er' and sAMAccountName= 'Chethan' and userpassword='b c123' ORDER BY sAMAccountName" , "Provider=ADsDS OObject"
if not rsUsers.eof then
While Not rstUsers.EOF
response.write "<b>" & rstUsers("sAMAc countName").Val ue & "</b>"
rstUsers.MoveNe xt
Wend
else
Response.Write "Account Details not found"
end if
rstUsers.Close
Set rstUsers = Nothing
%>
</form>
The above code is showing
Error Type:
(0x8007054B)
/sulzer/ldap2.asp, line 9
I am unable to resolve this error .
Please any one can help me>>>
<%@ LANGUAGE="VBSCR IPT" %>
<form method="POST">
<%
Dim rstUsers
Dim objDSE, strNamingContex t
Set objDSE = GetObject("LDAP ://rootDSE")
strNamingContex t = objDSE.Get("def aultNamingConte xt")
Set objDSE = Nothing
set rstUsers= CreateObject("A DODB.Recordset" )
rstUsers.Open "SELECT sAMAccountName FROM 'LDAP://CN=Users," & strNamingContex t & "' WHERE objectClass='us er' and sAMAccountName= 'Chethan' and userpassword='b c123' ORDER BY sAMAccountName" , "Provider=ADsDS OObject"
if not rsUsers.eof then
While Not rstUsers.EOF
response.write "<b>" & rstUsers("sAMAc countName").Val ue & "</b>"
rstUsers.MoveNe xt
Wend
else
Response.Write "Account Details not found"
end if
rstUsers.Close
Set rstUsers = Nothing
%>
</form>
The above code is showing
Error Type:
(0x8007054B)
/sulzer/ldap2.asp, line 9
I am unable to resolve this error .
Please any one can help me>>>
Comment