I am getting just one value returned from the field in the
DB called 'area into the textarea in my form called
'otherdescription based on my 2nd sql statement in the
code below .
it just returns one value when it should return 2values -
Because each billNo from the DB appears twice in the
field called area like below
Is it that it is not looping at all and just loops once thru
the database that is why it is not picking up the other
value????
<%
Test = request.querystring("Test")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("adodb.Recordset")
Set Rs1 = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
SQLQuery = "Select * from tblopgaCOm2 WHERE Test =
" & Test
RS.Open SQLQuery ,Conn,1,1
strBillNo=RS("billNo")
SQLQuery1= "Select area FROM tblopgaCOm2 WHERE
billNo = " & strBillNo &"' "
RS1.Open SQLQuery ,Conn,1,1
%>
<form method="POST" action="legconfirm.asp" >
<table border="0" cellpadding="2" cellspacing="4"
width="121%" height="172">
<tr>
<td width="20%" bgcolor="#99CCFF"
height="36"> <b><font size="2">ID#:
</font> </b><input type="text" name="Test"
style="background-color: #D2D2D2" size="9"
value="<%=RS("Test")%>" readonly></td>
<td width="43%" bgcolor="#99CCFF"
height="36"> <b><font size="2">BILL</font>#</b>
<input type="text" name="billNo"
style="background-color: #D2D2D2" size="9"
value="<%=RS("billNo")%>" readonly></td>
<td width="23%" bgcolor="#99CCFF" height="36"><font
size="2"><b>PRIORCOMMENTS:</b></font></td>
<td width="239%" bgcolor="#C0C0C0" height="36"
colspan="4"><textarea rows="8" name="priorcomments"
readonly style="background-color: #D2D2D2"
cols="50"><%=RS("priorcomments")%></textarea>
<p> </td>
<td width="52%" height="36"> </td>
<tr>
<td width="23%" bgcolor="#99CCFF"
height="36"><font size="2"><b>OTHER
DESCRIPTION</b></font><b><font
size="2">:</font></b></td>
<td width="239%" bgcolor="#E6E3E4" height="36"
colspan="4">
<textarea rows="4" name="otherdescription"
cols="20">
<%While Not Rs1.EOF
Response.Write(Rs1("area") & ", ")
Rs1.MoveNext
Wend
%>
</textarea></td>
DB called 'area into the textarea in my form called
'otherdescription based on my 2nd sql statement in the
code below .
it just returns one value when it should return 2values -
Because each billNo from the DB appears twice in the
field called area like below
Is it that it is not looping at all and just loops once thru
the database that is why it is not picking up the other
value????
<%
Test = request.querystring("Test")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("adodb.Recordset")
Set Rs1 = Server.CreateObject("adodb.Recordset")
Conn.Open "eiwp"
SQLQuery = "Select * from tblopgaCOm2 WHERE Test =
" & Test
RS.Open SQLQuery ,Conn,1,1
strBillNo=RS("billNo")
SQLQuery1= "Select area FROM tblopgaCOm2 WHERE
billNo = " & strBillNo &"' "
RS1.Open SQLQuery ,Conn,1,1
%>
<form method="POST" action="legconfirm.asp" >
<table border="0" cellpadding="2" cellspacing="4"
width="121%" height="172">
<tr>
<td width="20%" bgcolor="#99CCFF"
height="36"> <b><font size="2">ID#:
</font> </b><input type="text" name="Test"
style="background-color: #D2D2D2" size="9"
value="<%=RS("Test")%>" readonly></td>
<td width="43%" bgcolor="#99CCFF"
height="36"> <b><font size="2">BILL</font>#</b>
<input type="text" name="billNo"
style="background-color: #D2D2D2" size="9"
value="<%=RS("billNo")%>" readonly></td>
<td width="23%" bgcolor="#99CCFF" height="36"><font
size="2"><b>PRIORCOMMENTS:</b></font></td>
<td width="239%" bgcolor="#C0C0C0" height="36"
colspan="4"><textarea rows="8" name="priorcomments"
readonly style="background-color: #D2D2D2"
cols="50"><%=RS("priorcomments")%></textarea>
<p> </td>
<td width="52%" height="36"> </td>
<tr>
<td width="23%" bgcolor="#99CCFF"
height="36"><font size="2"><b>OTHER
DESCRIPTION</b></font><b><font
size="2">:</font></b></td>
<td width="239%" bgcolor="#E6E3E4" height="36"
colspan="4">
<textarea rows="4" name="otherdescription"
cols="20">
<%While Not Rs1.EOF
Response.Write(Rs1("area") & ", ")
Rs1.MoveNext
Wend
%>
</textarea></td>