Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Batch Close Topics
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Batch Close Topics

 Post Reply Post Reply
Author
Dafydd View Drop Down
Newbie
Newbie


Joined: 22 October 2003
Location: United Kingdom
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dafydd Quote  Post ReplyReply Direct Link To This Post Topic: Batch Close Topics
    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!

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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 & ";"

Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2003 at 2:29am
To make it work with the Access version then yes everyone will need to change it.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.