1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

hi

Discussion in 'ASP' started by vinothvsp, Nov 16, 2008.

  1. vinothvsp

    vinothvsp New Member

    Joined:
    Nov 16, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Code:
    Set rs =  con.Execute(strsql)
    
     
  3. vinothvsp

    vinothvsp New Member

    Joined:
    Nov 16, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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
     

Share This Page