Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get the value from a dynamic table

Status
Not open for further replies.

AndyApp

Programmer
Dec 20, 2001
259
GB
I have a table that is being dynamically populated from a recordset that gets its SQL string from a session variable on another page.

The trouble is, that the results need to be linkable to yet another page and the link needs to include an SQL statement to open the next recordset using the result. i.e. Select * FROM blah WHERE blah ='result'

If the result is just one record then no problem but I can't get it to work if there are more then one records returned even though they have different names.

I think I need to be able to capture the result after it is put into the table, this will make sure it's the right one, and then build the SQL Statement.

Trouble is how?
 
<table>
<%Do while not RECORDSET.EOF%>
<tr>
<td>
<a href = NEXTPAGE.asp?strResult=<%=RECORDSET(&quot;RESULT&quot;)%>><%=RECORDSET(&quot;DISPLAY RESULT&quot;)%></a>
</td>
</tr>
<%RECORDSET.movenext
loop%>
</table>

On the NEXTPAGE.asp:
<%
sSql = &quot;Select * FROM blah WHERE blah = '&quot; & Request(&quot;strResult&quot;) & &quot;'&quot;
%>



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top