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 %>
<html>
<head>
<title>view</title>
</head>
<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>
<br><br>
<table bgcolor="#8FA5AB" color="ghostwhite" border="1" cellpadding="0" cellspacing="0" align="center" width="557">
<tr><td><b><center>DG</center><b></td></tr>
</table>
<br><br><br>
<form name="f1" action="org.asp">
<center>
<table border="1">
<tr>
<%do until sql.eof %>
<%i=1%>
<td>
<b>
<input type="button" name="b<%=i%>"
value="<%= sql("dname")%>"></b>
<%i=i+1%>
<br><br><br>
<%j=sql("dname")%>
<% while (sql("dname") = j)%>
<% k=1 %>
<input type="button" name="b<%=k%>" value="<%= sql("ename")%>">
<% k=k+1%>
<%sql.MoveNext
wend %>
<br><br><br>
</td>
<%sql.MoveNext
loop %>
</tr>
</table>
</center>
</form>
</body>
</html>
ASKER
if u can correct the error then correct it by urself i will be more thankful to u.