Crosspost to:
http://groups.yahoo.com/group/ADSIANDDirectoryServices
all the ActiveDirectory experts live there and my best friend Carlos
and his gang will help you if we cannot here.
On 4/14/05, knightswhosaynee2000 <[EMAIL PROTECTED]> wrote:
>
>
> 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") & " " & 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 the Yahoo! Terms of Service.
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/