I am trying to use the code below to get the user's display name and 
e-mail address from active directory. I am getting an error 
message "Table does not exist" on the execute line. Any suggestions?

           strUser = request.ServerVariables("LOGON_USER")
            strUser = Mid(strUser, (InStr(strUser, "\")+1))

            strBase   =  "<LDAP://dc=myDomain,dc=com>;"
            strFilter = "(&(objectclass=user)
(objectcategory=person)" & _
                        "(SAMAccountName=" & strUser & "));"
            strAttrs  = "Adspath,distinguishedName,name;"
            strScope  = "subtree"

            set objConn = CreateObject("ADODB.Connection")
            objConn.Provider = "ADsDSOObject"
            objConn.Open "Active Directory Provider"
            set objRS = objConn.Execute(strBase & strFilter & 
strAttrs & strScope)
            objRS.MoveFirst
            usrDisplay = objRS("Firstname") & "&nbsp;" & objRS
("LastName")
            usrMail = objRS("EmailAddress")









 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to