|
Hope you all are alive and well cause I will need you to come to my rescue once again. appreciate this as Always. I am working with asp with an Access DB back end.
The code below worked well until I added this second select statement; {SELECT area FROM tblopgaCOm2 WHERE billNo = '" & Request.Form("BILLNO") " } this select statement should display its data in the text area called otherdescription.But no data is being displayed. All the other data that is displayed on the form are displayed from the 1st SQL Statement which works okay. Is it possible to look at my script & tell me if I am missing out anything from this script.A precise response will be greatly appreciated.Thank you.
<% Test = request.querystring("Test") StrbillNo = Trim(Request.form("billNo")) 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
SQLQuery1= "SELECT area FROM tblopgaCOm2 WHERE billNo =
'"&Request.Form("billNO")&"' " Rs1.Open SQLQuery1, Conn,1,1 %>
<form method="POST" action="legconfirm.asp" > <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="10%" bgcolor="#99CCFF" height="36">
<input type="text" name="rdr3rd" style="background-color: #D2D2D2"
size="13" value="<% if RS("rdr3rd")= "Y" Then Response.write("3rd Reader") Else Response.write("")
End if%>" readonly </td> <td width="23%" bgcolor="#99CCFF" height="36"><font
size="2"><b>PRIORCOMMENTS:</b></font>&l t;/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="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"> <%While Not Rs1.EOF%> <% Dim desc desc=desc & Rs1("area")&"," %> <% Rs1.MoveNext Wend %>
<textarea rows="2" name="otherdescription" cols="20"> <%=desc%></textarea></td> <tr> <td width="23%" bgcolor="#99CCFF" height="36"><b><font
size="2">COMMENTS:</font></b></td> <td width="239%" bgcolor="#E6E3E4" height="36" colspan="4"><textarea
rows="6" name="comments" cols ="50"><%=RS("comments")%></textarea> <td width="52%" height="36"> </td> <tr> <td width="23%" bgcolor="#99CCFF" height="36"><input type="submit"
value="Submit" name="B1"><input type="reset" value="Reset"
name="B2"></td>
|