Print Page | Close Window

Batch Close Topics

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=6629
Printed Date: 03 April 2026 at 5:57pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Batch Close Topics
Posted By: Dafydd
Subject: Batch Close Topics
Date Posted: 22 October 2003 at 8:34am

Whenever i try to batch close any topics in the access version of 7.5 i get this error message

Microsoft JET Database Engine error '80040e14'

Characters found after end of SQL statement.

/v7-5/admin/archive_topics.asp, line 95

Any ideas?  I tend to batch close a load of topics every day and now i've upgraded, i use it!




Replies:
Posted By: WebWiz-Bruce
Date Posted: 22 October 2003 at 9:17am
Replace lines 74 to 91 of archive_topics.asp to the following:-

'Initalise the strSQL variable with an SQL statement to get the topic from the database
If strDatabaseType = "SQLServer" AND blnClose Then
    strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked=1 "
ElseIf strDatabaseType = "Access" AND blnClose Then
    strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked=True "
ElseIf strDatabaseType = "SQLServer" AND blnClose = false Then
    strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked=0 "
ElseIf strDatabaseType = "Access" AND blnClose = false Then   
    strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked=False "
End If
If intForumID = 0 Then
    strSQL = strSQL & "WHERE " & strDbTable & "Topic.Last_entry_date < " & strDatabaseDateFunction & " - " & intNoOfDays  & " "
Else
    strSQL = strSQL & "WHERE (" & strDbTable & "Topic.Last_entry_date < " & strDatabaseDateFunction & " - " & intNoOfDays  & ") AND (" & strDbTable & "Topic.Forum_ID=" & intForumID & ") "
End If

If intPriority <> 4 Then strSQL = strSQL & " AND (" & strDbTable & "Topic.Priority=" & intPriority & ")"
strSQL = strSQL & ";"



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: wistex
Date Posted: 22 October 2003 at 7:27pm

Originally posted by -boRg- -boRg- wrote:

Replace lines 74 to 91 of archive_topics.asp to the following:-

Does everyone need to change that?  Also, is it fixed in version 7.51?



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: WebWiz-Bruce
Date Posted: 23 October 2003 at 2:29am
To make it work with the Access version then yes everyone will need to change it.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



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