I'm trying to transfrom this:
objCommand.CommandText = "SELECT Name, ADsPath FROM " & sADPath & _
                " WHERE objectCategory='organizationalUnit' ORDER BY Name"  
into this using the LDAP OR syntax from MS's scripting site:
objCommand.CommandText = "SELECT Name, ADsPath FROM " & sADPath & _
                " WHERE |(objectCategory='organizationalUnit')(objectCategory='container') ORDER BY Name"  

I'm doing this because the Users OU is really a container, not an OU. The results I get back are not at all correct.
Can anyone point out the problem with my code and/or point me in the right direction for using OR in complex LDAP queries?

Thanks,
Andrew Fidel

Reply via email to