hi

vinothvsp's Avatar, Join Date: Nov 2008
Newbie Member
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

Code:
<script language="javascript">
 mytree = new dTree('mytree');
 <%
 strsql="select count(introducername) as total from mlm where introducername='"& introducername &"'"
 con.Execute(strsql)
  Do While not rs.EOF 
  %>
 <%
 boid = 0
 //rs.fields("introducerName")=rc
  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")%>', '', '');
 <%else%>
  mytree.add(<%=rs.fields("IntroducerName")%>, <%=rs.fields("username")%>,'<%=boid%>',  'javascript:;', '<%=rs.fields("username")%>', '', '');
 <%end if%>
 <%rs.MoveNext
loop
 f
 rs.Close
 %>
 document.write(mytree);
 </script>
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
vinoth
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Code: ASP
Set rs =  con.Execute(strsql)
0
vinothvsp's Avatar, Join Date: Nov 2008
Newbie Member
i'm not geting any due to which u have specified

i'm geting the from the line

"do while not rs.eof"

its not checking the end of file, then more over i'm geting the result while passing integer value than passing string value, but i need to get the count of the string value in the database based on the value which i'm passing through text field

so plz hlp me to rectify the error

thanks in advance

with regards,
vinoth.S