If I do the same thing in ColdFusion, the page loads quickly. However, this ASP code seems to have some issues as the page never fully loads. I'm following the logic used in my CF code. Any ideas what's killing it?
All the way up to the "pretty much just some HTML here" area has been tested and showed no performance issues.
Thanks
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString = strwmsdb
objConn.Open
Dim strSQL
strSQL = "select * from boardlists order by boardgroup, id"
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.Open strSQL, objConn
.
.
(pretty much just some HTML here)
.
.
Dim gr_check, gr_no
gr_check = 0
gr_no = 0
Do While Not objRS.EOF
If objRS("boardname" <> "" then
If gr_check = 0 then
gr_no = objRS("boardgroup"
Response.Write "<tr>"
%>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="messtitle"><%= objRS("gr_name" %></font></td>
<%
Response.Write "</tr>"
gr_no = 1
End If
Dim strSQLGetMods, strSQLTot_Messes, strSQLGetRec
strSQLGetMods = "SELECT * FROM board_mods WHERE boardnum = " & objRS("id" & " ORDER BY userid"
strSQLTot_Messes = "SELECT count(*) as tots FROM messages WHERE boardnum = " & objRS("id"
strSQLGetRec = "SELECT * FROM index_rec_mess WHERE boardnum = " & objRS("id" & " ORDER BY messdate DESC"
Dim objRSGM, objRSTM, objRSGR
Set objRSGM = Server.CreateObject("ADODB.Recordset"
Set objRSTM = Server.CreateObject("ADODB.Recordset"
Set objRSGR = Server.CreateObject("ADODB.Recordset"
objRSGM.Open strSQLGetMods, objConn
objRSTM.Open strSQLTot_Messes, objConn
objRSGR.Open strSQLGetRec, objConn
If gr_no <> objRS("boardgroup" then
gr_no = objRS("boardgroup"
Response.Write "<tr>"
%>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="messtitle"><%= objRS("gr_name" %></font></td>
</tr>
<tr>
<td valign="top" bgcolor="<%= strbgcolor %>" width="45%"><font class="basictext"><cfoutput>» <a href="messages.cfm?board=<%= objRS("id" %>"><%= objRS("boardname" %></a></cfoutput><cfif private EQ 1><br><b>PRIVATE</b> (<a href="private_login.cfm?board=<%= objRS("id" %>">Log In</a>)</cfif></font></td>
<td valign="top" bgcolor="<%= strbgcolor %>" width="25%" align="center"><font class="basictext">
<%
Dim strTheMods, iTheLenMods
strTheMods = ""
Do While Not objRSTM.EOF
strTheMods = strTheMods & ", " & objRSTM("userid"
Loop
iTheLenMods = len(strTheMods) - 2
strTheMods = right(strTheMods, iTheLenMods)
Response.Write strTheMods & "</font></td>"
%>
<td valign="top" bgcolor="<%= strbgcolor %>" width="10%" align="center"><font class="basictext"><%= objRSTM("tots" %></font></td>
<td valign="top" bgcolor="<%= strbgcolor %>" width="20%" align="center"><font class="basictext"><%= objRSGR("authorname" %><br><%= objRSGR("messdate" %></font></td>
</tr>
<tr>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="basictext"><%= objRS("boarddesc" %></font></td>
</tr>
<%
End If
objRSGM.Close
Set objRSGM = Nothing
objRSTM.Close
Set objRSTM = Nothing
objRSGR.Close
Set objRSGR = Nothing
End If
Loop
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
------------------------------------
"Unclean beast! Get thee down! Be thou consumed by the fires that made thee!" - Brother Jacobus in Dragonslayer
All the way up to the "pretty much just some HTML here" area has been tested and showed no performance issues.
Thanks
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.ConnectionString = strwmsdb
objConn.Open
Dim strSQL
strSQL = "select * from boardlists order by boardgroup, id"
Dim objRS
Set objRS = Server.CreateObject("ADODB.Recordset"
objRS.Open strSQL, objConn
.
.
(pretty much just some HTML here)
.
.
Dim gr_check, gr_no
gr_check = 0
gr_no = 0
Do While Not objRS.EOF
If objRS("boardname" <> "" then
If gr_check = 0 then
gr_no = objRS("boardgroup"
Response.Write "<tr>"
%>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="messtitle"><%= objRS("gr_name" %></font></td>
<%
Response.Write "</tr>"
gr_no = 1
End If
Dim strSQLGetMods, strSQLTot_Messes, strSQLGetRec
strSQLGetMods = "SELECT * FROM board_mods WHERE boardnum = " & objRS("id" & " ORDER BY userid"
strSQLTot_Messes = "SELECT count(*) as tots FROM messages WHERE boardnum = " & objRS("id"
strSQLGetRec = "SELECT * FROM index_rec_mess WHERE boardnum = " & objRS("id" & " ORDER BY messdate DESC"
Dim objRSGM, objRSTM, objRSGR
Set objRSGM = Server.CreateObject("ADODB.Recordset"
Set objRSTM = Server.CreateObject("ADODB.Recordset"
Set objRSGR = Server.CreateObject("ADODB.Recordset"
objRSGM.Open strSQLGetMods, objConn
objRSTM.Open strSQLTot_Messes, objConn
objRSGR.Open strSQLGetRec, objConn
If gr_no <> objRS("boardgroup" then
gr_no = objRS("boardgroup"
Response.Write "<tr>"
%>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="messtitle"><%= objRS("gr_name" %></font></td>
</tr>
<tr>
<td valign="top" bgcolor="<%= strbgcolor %>" width="45%"><font class="basictext"><cfoutput>» <a href="messages.cfm?board=<%= objRS("id" %>"><%= objRS("boardname" %></a></cfoutput><cfif private EQ 1><br><b>PRIVATE</b> (<a href="private_login.cfm?board=<%= objRS("id" %>">Log In</a>)</cfif></font></td>
<td valign="top" bgcolor="<%= strbgcolor %>" width="25%" align="center"><font class="basictext">
<%
Dim strTheMods, iTheLenMods
strTheMods = ""
Do While Not objRSTM.EOF
strTheMods = strTheMods & ", " & objRSTM("userid"
Loop
iTheLenMods = len(strTheMods) - 2
strTheMods = right(strTheMods, iTheLenMods)
Response.Write strTheMods & "</font></td>"
%>
<td valign="top" bgcolor="<%= strbgcolor %>" width="10%" align="center"><font class="basictext"><%= objRSTM("tots" %></font></td>
<td valign="top" bgcolor="<%= strbgcolor %>" width="20%" align="center"><font class="basictext"><%= objRSGR("authorname" %><br><%= objRSGR("messdate" %></font></td>
</tr>
<tr>
<td valign="top" colspan="4" bgcolor="<%= strbgcolor %>" width="100%"><font class="basictext"><%= objRS("boarddesc" %></font></td>
</tr>
<%
End If
objRSGM.Close
Set objRSGM = Nothing
objRSTM.Close
Set objRSTM = Nothing
objRSGR.Close
Set objRSGR = Nothing
End If
Loop
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
------------------------------------
"Unclean beast! Get thee down! Be thou consumed by the fires that made thee!" - Brother Jacobus in Dragonslayer