Here is my question.
I am trying to connect to LDAP but as the code that a member send me (Peter) did not work.
Now I am stuck. Here is what I think the problem. This piede of code cannot connect to LDAP. But I don’t know why. There is no error routine in the code so I don’t know why it is not connecting.

If I make a message:
MessageBox("LDAP://$userOU,dc=$DomainName,dc=$Toplevel","adsDomain =",16)
MessageBox("LDAP://cn=$Group,$GroupOU,dc=$DomainName,dc=$Toplevel","adsGroup =",16)
The values are filled by what appears to be good. But if I make a message for the value $adsDomain or $adsGroup they are empty.
Whats is it that’s going wrong.

Code:
; connecting to Ldap

$adsDomain = GetObject("LDAP://$userOU,dc=$DomainName,dc=$Toplevel")
$adsGroup = GetObject("LDAP://cn=$Group,$GroupOU,dc=$DomainName,dc=$Toplevel")