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ủ đề hot nhất</B></TD> <TD width="15%" class="text_top_sub">Chủ đề mới nhất</B></TD> <TD width="30%" class="text_top_sub">Bài viết mới nhấ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ủ đề</td> <td width="20%" class="text_top_sub">Lầ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ủ đề</td> <td width="20%" class="text_top_sub" align="center">Trả lờ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ài viết</td> <td width="10%" class="text_top_sub"><center>Xem</center></td> <td width="10%" class="text_top_sub">Trả lờ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 !
|