2 Replies Latest reply: Jul 28, 2015 4:03 PM by Marco Wedel RSS

    LDAP - AD group data extraction issue

      Extracting data from ADgroups

       

      groupnames:
      load * inline [
      Groupname
      GRP-EXT-Customers-500
      GRP-EXT-Customers-301
      GRP-EXT-Customers-402

      ];

       

       

       

       

       

      for i = 0 to NoOfRows('groupnames') - 1
      let group = peek('Groupname', i, 'groupnames');
      let groupschr(39)& 'CN='  &  group &  ',OU=Groups,OU=Other,OU=Customers,DC=ext,DC=companyname,DC=com' & chr(39);



           LET arg=chr(01); //
           DO
      AD:
      LOAD distinct
      *,
      '$(group)'
      as Groupname, //
                      samAccountName as Name1              
      ;
      SQL Select
      displayName,
      mail,
      givenname,
      sn,
      samAccountName,
      lockoutTime

      from 'LDAP://servername.companyname.com/OU=Users,OU=Accounts,OU=Other,OU=Customers,DC=ext,DC= companyname,DC=com' where  memberOf =
      $(groups) and samAccountName >'$(arg)'; 

      EXIT DO WHEN ScriptError > 1    //
                 EXIT DO WHEN NoOfRows('AD') = 0  // Stop loop if SELECT returns nothing
                 EXIT DO WHEN peek('samAccountName') = '$(arg)';  // --> no more entries
          
      LET arg=peek('samAccountName'); //   

         LOOP


      next

        It is not extracting more than 1000 records.OLEDB read failed and QVX_UNEXPECTED_END_OF_DATA errors.I am getting this issues after QV11 version.