We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Asp help urgently

leokhan asked
Medium Priority
Last Modified: 2011-09-20
dear member,
         I need help in a program of ASP   , in which i have to draw values from two tables (parent and Child) in a tree form and put them in a way that each child record come below its corresponding parent record and next parent record is next in the same row after previous parent record with the same condition as i have told. i have four parent records and each parent record has two child records. i have wrote a code in which i m having some problems this code is giving two record from ist child records and  1 from each later as well as it is also showing one record in child 2 which is actually part of child3.
 sir plz help me i will be very thankful to u.
         i m sending u the code.sir plz remove the error and send me the correct code

<% Option Explicit %>
<Body bgcolor="white" >
    dim sql,connect,sql2,i,j,k
      set connect=server.createobject("ADODB.Connection")
      connect.open "Hd"

      set sql= connect.Execute(_
                 "select dname,ename from dept,emp where dept.deptid=emp.deptid ")%>

 <center><h1>ASP Chart</h1></center>
<table bgcolor="#8FA5AB" color="ghostwhite" border="1" cellpadding="0" cellspacing="0" align="center" width="557">

<form name="f1" action="org.asp">
<table border="1">
<%do until sql.eof %>
          <input type="button" name="b<%=i%>"
value="<%= sql("dname")%>"></b>

<% while (sql("dname") = j)%>
  <% k=1 %>        
          <input type="button" name="b<%=k%>" value="<%= sql("ename")%>">
        <% k=k+1%>    
         wend %>

         loop %>



Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview


thanxs for reply.i will try this first and then tell u about it.
      if u can correct the error then correct it by urself i will be more thankful to u.
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.