streborr
IS-IT--Management
- Jan 16, 2002
- 98
I can't figure out why the records aren't being returned.
Here's the code:
The page sending the ID:
<%
sSQL = "Select * from forums"
Set oRS = oConn.Execute(sSQL)
thecount = "0"
%>
<table width="500" cellpadding="0" cellspacing="0" border="0">
<%
Do Until oRS.eof
%>
<tr>
<td><a href="forum.asp?ID=<%=oRS("ID"
%>"><%=oRS("ForumName"
%></a>
</td>
</tr>
<%
thecount = thecount+1
oRS.moveNext
loop
%>
</table>
And the page receiving the ID: forum.asp
<%
dim ID
ID = Request("ID"
sSQL = "Select * from forum Where (posttype = 'm') and (ForumID = ID)"
Set oRS = oConn.Execute(sSQL)
thecount = "0"
response.write ID
%>
<table width="500" cellpadding="0" cellspacing="0" border="0">
<%
Do Until oRS.eof
%>
<tr>
<td><a href="readmessage.asp?ID=<%=oRS("ID"
%>"><%=oRS("Title"
%></a>
<font size="-1"><i>by <font color="#ff0000"><%=oRS("Username"
%></font>
on <%=oRS("PostDate"
%> at <%=oRS("PostTime"
%></i></font></td>
</tr>
<%
thecount = thecount+1
oRS.moveNext
loop
%>
</table>
The response.write ID does display the right ID but no records are displayed. There are records, it just goes to the eof.
Thanks for any help!
Rick
Here's the code:
The page sending the ID:
<%
sSQL = "Select * from forums"
Set oRS = oConn.Execute(sSQL)
thecount = "0"
%>
<table width="500" cellpadding="0" cellspacing="0" border="0">
<%
Do Until oRS.eof
%>
<tr>
<td><a href="forum.asp?ID=<%=oRS("ID"
</td>
</tr>
<%
thecount = thecount+1
oRS.moveNext
loop
%>
</table>
And the page receiving the ID: forum.asp
<%
dim ID
ID = Request("ID"
sSQL = "Select * from forum Where (posttype = 'm') and (ForumID = ID)"
Set oRS = oConn.Execute(sSQL)
thecount = "0"
response.write ID
%>
<table width="500" cellpadding="0" cellspacing="0" border="0">
<%
Do Until oRS.eof
%>
<tr>
<td><a href="readmessage.asp?ID=<%=oRS("ID"
<font size="-1"><i>by <font color="#ff0000"><%=oRS("Username"
on <%=oRS("PostDate"
</tr>
<%
thecount = thecount+1
oRS.moveNext
loop
%>
</table>
The response.write ID does display the right ID but no records are displayed. There are records, it just goes to the eof.
Thanks for any help!
Rick