[Date Prev][Date Next] [Chronological] [Thread] [Top]

Viewing members in a groupOfNames using LDAP/Active Server Pages



Good afternoon,

I don't know if this is the correct mailing list for this question, but it
seemed like the logical place to start. 

I am attempting to display the members of distribution lists in exchange
using LDAP and vbscript through an active server page. Right now I can
display all of our distribution lists, all of our recipients, everything on
the GAL, etc. But when I pull the member object from the database, I can't
figure out how to displace each name listed in the member object.

Here is the code I am using. Right now it shows the name of the group I have
chosen:
-------------------------------------------

Dim objConn
Dim objRS

Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")

objConn.Provider = "ADsDSOObject"  'The ADSI OLE-DB provider
objConn.Open "ADs Provider"

strQuery = "<GC://SERVER:389>;(&(objectClass=groupOfNames)(o=Some
Distribution List));cn;subtree"
'strQuery = "SELECT cn FROM 'GC://SERVER:389' WHERE
objectClass='groupOfNames' AND cn='Some Distribution List"

Set objRS = objConn.Execute(strQuery)

While objRS.EOF
Response.Write(objRS("cn"))
objRS.MoveNext
Wend

Set objRS = Nothing
Set objConn = Nothing 

--------------------------------------------
Does that make sense? Thanks in advance to anyone who can help.

Scott