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" >
set sql= connect.Execute(_
"select dname,ename from dept,emp where dept.deptid=emp.deptid ")%>
<table bgcolor="#8FA5AB" color="ghostwhite" border="1" cellpadding="0" cellspacing="0" align="center" width="557">
<form name="f1" action="org.asp">
<%do until sql.eof %>
<input type="button" name="b<%=i%>"
<% while (sql("dname") = j)%>
<% k=1 %>
<input type="button" name="b<%=k%>" value="<%= sql("ename")%>">