Declare Variables
Note
Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.
This code segment declares all the (global) variables for the script, because the script doesn't contain any functions with local variables. Although it is optional to declare global variables before you use them in JScript, it is good programming practice to do so.
var strGroupBy; // Name of GroupBy column.
var intI, intJ; // Index variables.
var objQ; // Query object.
var strRecord; // Output record of query results.
var objRS_Child; // Child Recordset object.
var objRS_Parent; // Parent Recordset object.
var intRS_Child_Count; // Number of current record of child Recordset.
var intRS_Parent_Count; // Number of current record of parent Recordset.
var objU; // Utility object.