I am using WWF v.7.01 (SQL Server). I have created a Forum named "News and Views", then I transferred all my data from Web Wiz News application (Access 2000 version) to the tables tblTopic, tblThread, also updated the No_of_posts filed in the tblAuthor table of the Forum application. Everything with all the tables is ok in the Enterprise Manager. But the forum default.asp page is showing 0 topics and 0 posts. Anyone can help me why forum's default.asp page is not showing the newly added topics and threads. I have deleted the cookies set by the forum but same problem. Please help.
I have written the following script in my ASP page for transferring data from News application to WWF.
include file="common.asp" in start
Dim rsSQLNews
Dim rsAccess
Dim rsThreads
Dim lngTopicID
lngTopicID = 0
Set rsAccess = Server.CreateObject("ADODB.Recordset")
Set rsSQLNews = Server.CreateObject("ADODB.Recordset")
Set rsThreads = Server.CreateObject("ADODB.Recordset")
rsAccess.ActiveConnection = "Provider=Microsoft.JET.OLEDB.4.0; Data Source=C:\db\news.mdb"
rsAccess.Open "SELECT * FROM tblNews"
rsSQLNews.ActiveConnection = adoCon
rsSQLNews.CursorType = 3
rsSQLNews.LockType = 3
rsSQLNews.Open "SELECT * FROM tblTopic"
rsThreads.ActiveConnection = adoCon
rsThreads.CursorLocation = 3
rsThreads.LockType = 3
rsThreads.Open "SELECT * FROM tblThread"
Do While Not rsAccess.EOF
With rsSQLNews
.AddNew
.Fields("Forum_ID") = 35
.Fields("Subject") = rsAccess.Fields("News_title")
.Fields("Start_date") = rsAccess.Fields("News_Date")
.Fields("Priority") = 0
.Update
.Requery
.MoveLast
lngTopicID = rsSQLNews("Topic_ID")
End With
With rsThreads
.AddNew
.Fields("Topic_ID") = lngTopicID
.Fields("Author_ID") = 1432
.Fields("Message") = rsAccess.Fields("Short_news") & rsAccess.Fields("News_item")
.Fields("Message_date") = rsAccess.Fields("News_Date")
.Fields("IP_addr") = "127.0.0.1"
.Update
.Requery
End With
adoCon.Execute "UPDATE tblAuthor SET No_of_posts = No_of_posts + 1 WHERE tblAuthor.Author_ID=1432"
rsAccess.MoveNext
Loop
Set rsCommon = Nothing
Set rsSQLNews = Nothing
Set rsThreads = Nothing
Set adoCon = Nothing
Any help will be highly appreciated.
Edited by PrivateEye