I have this ADOQuery:
SQL.Text := 'SELECT samAccountName FROM ''GC://' + sADForestName + ''' ' +
'WHERE objectCategory=''user'' ' +
'AND distinguishedName=''' + sADUserName + ''' ' +
'AND memberOf=''' + sADGroupName + '''';
And this is work fine to get group for user, but I need also check nested groups using LDAP_MATCHING_RULE_IN_CHAIN:
SQL.Text := 'SELECT samAccountName FROM ''GC://' + sADForestName + ''' ' +
'WHERE objectCategory=''user'' ' +
'AND distinguishedName=''' + sADUserName + ''' ' +
'AND memberOf:1.2.840.113556.1.4.1941:=''' + sADGroupName + '''';
But this request does not executed, I'm got error when calling ADOQuery.Open; (translated from Russian): "There was one or more errors while processing the command"
This is my error with request?