This is the first query:
sSQL = "select distinct TAC_ID from TAC_GRP"
rsConfig.CursorType = 3
rsConfig.Open sSQL, objConn
iTotalGroups = rsConfig.RecordCount
rsArray = rsConfig.GetRows
rsConfig.Close
At this point, rsArray contains 25 elements.
And this is the second query:
For iCount = 0 To (iTotalGroups - 1)
sGroup = rsArray(0, iCount)
sSQL = "select * from TAC_USR where TAC_ATTR='[Global]Groups' and TAC_VAL like '%" & sGroup & "%'"
rsConfig.CursorType = 3
rsConfig.Open sSQL, objConn
Response.Write("<tr>" & vbCRLF)
Response.Write("<td nowrap>" & vbCRLF)
Response.Write("<p align=""left"">"& sGroup & vbCRLF)
Response.Write("</td>" & vbCRLF)
Response.Write("<td nowrap>" & vbCRLF)
Response.Write("<p align=""center"">" & rsConfig.RecordCount & vbCRLF)
Response.Write("</td>" & vbCRLF)
Response.Write("</tr>" & vbCRLF)
Response.Write("<tr><td width=50% height=5></td>")
Response.Write("<td width=50% height=5></td></tr>")
rsConfig.Close
Next
Thanks for your attention.