Print Page | Close Window

Error on top10 file.

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=27217
Printed Date: 28 March 2026 at 1:40pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Error on top10 file.
Posted By: pigking_05pdh
Subject: Error on top10 file.
Date Posted: 05 April 2009 at 4:59pm
My forum uses WWF 9.5 for Access code .  I converted my database into SQL sever database ( use database_connection.asp file of ver 9.56 for SQLsever ) . Any problem ! A have top10.asp file for view hot topics , new topics .v.v..on forum header , ex :




File top10.asp here :

[code]<table width="950px" height="38" cellspacing="0" border="0" cellpadding="0" align="center">
    <tr><%   
        Response.Write vbCrLf & " <td align=""center"" background=""" & strImagePath & "tab_backg/top_center.gif"" width=""100%""><span class=""tieudediendan"">" & strTxttop10 & "</span></a></td>"
       
    %></tr>
</table>
<TABLE cellspacing="1" cellpadding="3" class="tableBorder" align="center" style="border-collapse: collapse" border="1" bordercolor="E5E5EF">
   
    <TR class="tableLedger">
        <TD colspan="2" width="30%" class="text_top_sub">Ch&#7911; &#273;&#7873; hot nh&#7845;t</B></TD>
        <TD width="15%" class="text_top_sub">Ch&#7911; &#273;&#7873; m&#7899;i nh&#7845;t</B></TD>
        <TD width="30%" class="text_top_sub">B&#224;i vi&#7871;t m&#7899;i nh&#7845;t</B></TD>
    </TR>
    <TR class="tableSta2">
        <TD colspan="2">
                <TABLE width="100%" cellspacing="0" cellpadding="0" border="0">
                <tr >
                             <td width="80%" class="text_top_sub">Ch&#7911; &#273;&#7873;</td>
                             <td  width="20%" class="text_top_sub">L&#7847;n xem</td>

                </tr>
       <%
       Dim x
strSQl = "SELECT Topic_ID, Subject, No_of_Views FROM tblTopic WHERE Hide = 'False' ORDER BY No_Of_Views DESC;"
rsCommon.Open strSQL, adoCon
If rsCommon.EOF then Response.Write("<tr><td align=""left"" valign=""top"">"&strTxtNotmen&"</td></tr>")
For x = 1 To 8
If rsCommon.EOF Then Exit For
%>
<tr><td width="98% align="left" valign="top"><a TITLE="<% = removeHTML(rsCommon("Subject"), 550, true )%>" href="dtvt.asp?TID=<% =rsCommon("Topic_ID") %>"><% =Left(rsCommon("Subject"), 25) %> ...</a> </td><td width="20%><span class="smText"  align="center"><% =rsCommon("No_Of_Views") %></span></td></tr>

<%
rsCommon.MoveNext
Next
rsCommon.Close
%>
                </TABLE>
        </TD>
        <TD rowspan="3" valign="top" width="30%">
                <TABLE width="100%" cellspacing=0 cellpadding=0>
                <tr>
                             <td width="80%" class="text_top_sub">Ch&#7911; &#273;&#7873;</td>
                             <td  width="20%" class="text_top_sub" align="center">Tr&#7843; l&#7901;i</td>

                </tr>
<%
strSQL = "SELECT TOP 20 " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_replies " & _
"FROM " & strDbTable & "Topic" & strDBNoLock & " " & _
"ORDER BY " & strDbTable & "Topic.Topic_ID DESC;"
rsCommon.Open strSQL, adoCon, 3, 3
Response.Write(vbCrLf & "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">")
If rsCommon.EOF or rsCommon.BOF Then
Response.Write(vbCrLf & "<table cellpadding=""0"" cellspacing=""0"" width=""100%"">")
Response.Write(vbCrLf & "<tr>" & strTxtNoMember & "</tr></table>")
End If
if rsCommon.RecordCount > 0 then
For intLoop = 1 To rsCommon.RecordCount
if rsCommon.EOF then exit For
Response.Write(vbCrLf & "<tr>")
Response.Write "<td width=""80%""><A TITLE=""" & removeHTML(rsCommon("Subject"), 550, true) & """ HREF=""dtvt.asp?TID=" & rsCommon("Topic_ID") & """>" & Left(rsCommon("Subject"), 25) & "...</A>"
Response.Write(vbCrLf & "<td width=""20%""><center>"& rsCommon("No_of_replies") & "")
Response.Write(vbCrLf & "</tr>")
rsCommon.MoveNext
 Next
 else
end if
rsCommon.close
 %>   
</TABLE>
    </TD>
        <TD rowspan="3" valign="top" width="20%">
                <TABLE width="100%" cellspacing=0 cellpadding=0>
                    <tr>
                        <td  width="55%" class="text_top_sub">B&#224;i vi&#7871;t</td>
                        <td width="10%" class="text_top_sub"><center>Xem</center></td>
                        <td width="10%" class="text_top_sub">Tr&#7843; l&#7901;i</td>
                    </tr>  
 <%                         
Dim rsMempost, nos
dim intLoop
strSQL = "SELECT TOP 20 " & strDbTable & "Topic.Topic_ID, " & strDbTable  & "Thread.Author_ID, " & strDbTable & "Topic.Subject , " & strDbTable & "Topic.No_of_views, " & strDbTable & "Topic.No_of_replies, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Thread.Message, " & strDbTable & "Thread.Message_date, " & strDbTable & "Thread.Thread_ID " & _
         "FROM " & strDbTable & "Topic" & strDBNoLock & "," & strD

-------------
Help !



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net