how can i integrate the latest 10 topics to default.asp? i tried that but it give error;
<% If strDatabaseType = "Access" Then %>
<tr class="tableLedger">
<td colspan="5" width="668">En son yazılan 10 konu</td>
</tr>
<tr class="tableSubLedger">
<td width="225" align="center">Konu</td>
<td width="127" align="center">Bölüm</td>
<td width="98" align="center">Gönderen</td>
<td width="130" align="center">Zaman</td>
<td width="60" align="center">Okunma</td>
</tr>
<tr class="tableSubLedger">
<td width="640" align="center" colspan="5"><p align="center"></P></td>
</tr>
<%
Dim rsLatestPosts
Dim intSay
Dim rsLatestPosts2
Dim sql2
Dim LastLatestPostsDateTime
Dim LastLatestPostsDate
Dim LastLatestPostsTime
Set rsLatestPosts = Server.CreateObject("ADODB.Recordset")
strSql = "Select " & strDbTable & "Topic.Subject, " & strDbTable & "Topic.Topic_ID, " & strDbTable & "Forum.Forum_ID, " & strDbTable & "Forum.Forum_name, " & strDbTable & "Topic.Last_Thread_ID, " & strDbTable & "Topic.No_of_views "
strSql = strSql & "From " & strDbTable & "Topic, " & strDbTable & "Forum Where " & strDbTable & "Topic.Hide = False And " & strDbTable & "Topic.Forum_ID = " & strDbTable & "Forum.Forum_ID Order By " & strDbTable & "Topic.Last_Thread_ID desc"
rsLatestPosts.Open strSQL, adoCon
For intSay = 1 to 10
if rsLatestPosts.Eof Then Exit For
Set rsLatestPosts2 = Server.CreateObject("ADODB.Recordset")
sql2 = "SELECT tblThread.Thread_ID, tblThread.Topic_ID, tblThread.Message_date, tblAuthor.Username, tblAuthor.Author_ID FROM (tblAuthor INNER JOIN tblThread ON tblAuthor.Author_ID = tblThread.Author_ID) WHERE tblThread.Hide = False And Topic_ID= " & rsLatestPosts("Topic_ID") & " order by Message_date desc"
rsLatestPosts2.Open sql2, adoCon
LastLatestPostsDateTime = rsLatestPosts2("Message_date")
LastLatestPostsDate = DateFormat(LastLatestPostsDateTime)
LastLatestPostsTime = TimeFormat(LastLatestPostsDateTime)
If intGroupID <> 2 Then Response.Write "<tr class=""tableRow""><td><a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & """><img border=""0"" src=""" & strImagePath & "right_arrow.gif"" /></a> <a href=""forum_posts.asp?TID=" & rsLatestPosts("Topic_ID") & "&get=last#" & rsLatestPosts("Last_Thread_ID") & """>" & rsLatestPosts("Subject") & "</a></td><td><a href=""forum_topics.asp?FID=" & rsLatestPosts("Forum_ID") & """>" & rsLatestPosts("Forum_name") & "</a></td><td align=""center"">"&rsLatestPosts2("Username") &"</td><td align=""center"">" & LastLatestPostsDate & "-" & LastLatestPostsTime & "</td><td align=""center"">" & rsLatestPosts("No_of_views") & "</td></tr>"
rsLatestPosts.MoveNext
Next
end if
Call closeDatabase()
%>