i'm new to this stuff , i'm designing the webpage in asp

in my page i'm trying to get a count of particular string value n pass it through the loop to form a tree structure in next page but while passing the value i get a following error

here is my code

<script language="javascript">
 mytree = new dTree('mytree');
 strsql="select count(introducername) as total from mlm where introducername='"& introducername &"'"
  Do While not rs.EOF 
 boid = 0
  if isNull(rs.fields("IntroducerName")) = False then
  boid = rs.fields("IntroducerName")
 end if
 <%if (rs.fields("IntroducerName")) = (request("id")) then%>
  mytree.add(<%=rs.fields("IntroducerName")%>, -1, '<%=boid%>', 'javascript:;', '<%=rs.fields("username")%>', '', '');
  mytree.add(<%=rs.fields("IntroducerName")%>, <%=rs.fields("username")%>,'<%=boid%>',  'javascript:;', '<%=rs.fields("username")%>', '', '');
 <%end if%>
the error which i;m geting while excecuting the pbm is as follows

Error Type:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/mlm/main.asp, line 97

plz post the solution as soon as possible, and snd a copy to my to vinoth04@gmail.com

thankz in advance

with regards