Question to Rob Wunderlich about extracting data AD
I am having troubles with the script to extract data from the active directory (the famous QVX_UNEXPECTED_END_OF_DATA: error).
I think something is wrong with de content of the data and I am trying to find out what and where.
I am very new at scripting (and Qlikview). Could you explain to me what is achieved with Let arg=chr(01)(in your script below)?
LETarg=chr(01); // Set search start name to a very low value DO ADGroups: LOAD nameasGroupName, distinguishedNameasGroupDN, infoasGroupInfo ; SQL select name, distinguishedName, info FROM 'LDAP://$(RootDse)' WHERE objectCategory='group' AND name>'$(arg)'; // Get rows where "name" is GT the arg EXITDO WHEN ScriptError > 1 // Stop loop if SELECT has error EXITDO WHEN NoOfRows('nameTable') = 0; // Stop loop if SELECT returns nothing EXITDO WHEN peek('GroupName') = '$(arg)'; // If the last "name" read is EQ to arg -- no more entries LETarg=peek('GroupName'); // Set the arg to the last "name" read LOOP