set ocommand = new adodb.command
with ocommand
.activeconnection = sconnectionstr
.commandtimeout = 15
.commandtext = "select name,description from 'ldap://" & m_sdomain _
& "' where objectcategory='group'"
debug.print .commandtext
.properties("searchscope") = ads_scope_subtree
.properties("chase referrals") = ads_chase_referrals_external
set oresult = .execute
end with
if not oresult is nothing then
do until oresult.eof
debug.print oresult("name"), oresult("description")(0)
oresult.movenext
loop
end if