Web Wiz
Home
Home
Hosting Services
Hosting Services
Knowledgebase
Knowledgebase
Community and Support Forums
Support Forums
Customer Login
Customer Login

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

Windows Web Hosting 30 Day Free Trial

Windows Web Hosting 30 Day Free Trial

Windows Hosting 30 Day Free Trial, with no obligation, on all our Windows Web and Reseller Hosting Packages.

For moreĀ informationĀ see our Windows Hosting 30 Day Free Trial page.

Error on Batch Close

 Post Reply Post Reply Page  12>
Author
hawkmanva View Drop Down
Newbie
Newbie


Joined: 25 July 2006
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote hawkmanva Quote  Post ReplyReply Direct Link To This Post Topic: Error on Batch Close
    Posted: 30 October 2006 at 1:00am
I get this error when I try to do a batch close on old messages older than 1 month.
 
 
 Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near ','.

/forum/admin_archive_topics.asp, line 107

Back to Top
Melkor View Drop Down
Groupie
Groupie
Avatar

Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2007 at 7:25am
Any solution for this? I'm getting the error too, same line.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2007 at 3:24pm
please noite this was pasted in the wrong forum,
 
i have now moved this topic.
 
please try re uploading the files
 
this issue will be investigated
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 493
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2007 at 1:36pm

Microsoft OLE DB Provider for SQL Server error '80040e14'

Line 1: Incorrect syntax near ','.

/forum2/admin_archive_topics.asp, line 89

same error here...and i am using an SQL Server DB...what is causing this?
Lets!
Back to Top
pretty_witch View Drop Down
Newbie
Newbie
Avatar

Joined: 16 June 2006
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote pretty_witch Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 4:30pm
Same error, SQL server... version 8.04
Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 4:55pm
On an empty line, 104 or thereabouts for v8.04 or 86 for v8.05, put in response.write strSQL and rerun the page. You should get a SQL string displayed. It should hopefully be possible to spot any error in the SQL command that is being executed.

Edited by MrMellie - 05 February 2007 at 4:56pm
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 493
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 8:26pm
UPDATE tblTopic, tblThread SET tblTopic.Locked = 1 WHERE (tblTopic.Last_Thread_ID = tblThread.Thread_ID) AND (tblThread.Message_date < '20070122 14:26:00') AND (tblTopic.Forum_ID = 1) ;
 
this is what I got after puting the response.write strSQL
 
 
Lets!
Back to Top
MrMellie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 December 2006
Location: United Kingdom
Status: Offline
Points: 251
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrMellie Quote  Post ReplyReply Direct Link To This Post Posted: 06 February 2007 at 10:08am
Hmmmm well yeah, I wouldn't expect that to work, it's invalid SQL syntax for a SQL Server UPDATE statement. You can't list multiple tables immediately after the UPDATE command. If you want to do an update based on the values in other tables, the sytnax for MS SQL is:

UPDATE tblTopic

SET tblTopic.Locked = 1
FROM tblTopic, tblThread
WHERE (tblTopic.Last_Thread_ID = tblThread.Thread_ID)
AND (tblThread.Message_date < '20070122 14:26:00')
AND (tblTopic.Forum_ID = 1) ;


I guess it was never tested on MS SQL. To fix it, find the code that says:

'Initalise the strSQL variable with an SQL statement to get the topic from the database

    If blnClose Then
         strSQL = "UPDATE " & strDbTable & "Topic, " & strDbTable & "Thread SET " & strDbTable & "Topic.Locked = " & strDBTrue & " "

    ElseIf blnClose = false Then
         strSQL = "UPDATE " & strDbTable & "Topic, " & strDbTable & "Thread SET " & strDbTable & "Topic.Locked = " & strDBFalse & " "
    End If


and replace it with:


'Initalise the strSQL variable with an SQL statement to get the topic from the database
if strDatabaseType="SQLServer" then
    If blnClose Then
         strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked = " & strDBTrue & " "

    ElseIf blnClose = false Then
         strSQL = "UPDATE " & strDbTable & "Topic SET " & strDbTable & "Topic.Locked = " & strDBFalse & " "
    End If
    strSQL=strSQL & "FROM " & strDbTable & "Topic, " & strDbTable & "Thread "
else
    If blnClose Then
         strSQL = "UPDATE " & strDbTable & "Topic, " & strDbTable & "Thread SET " & strDbTable & "Topic.Locked = " & strDBTrue & " "

    ElseIf blnClose = false Then
         strSQL = "UPDATE " & strDbTable & "Topic, " & strDbTable & "Thread SET " & strDbTable & "Topic.Locked = " & strDBFalse & " "
    End If
end if


I haven't been able to test that (Captcha is screwed on this PC) but I think it should be ok.
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



Become a Fan on Facebook Follow us on Twitter Web Wiz on Google+ Community Forums Web Wiz Blogs Web Wiz News
Company Information | Contact Web Wiz | Terms & Conditions | Privacy Policy

Prices exclude VAT unless otherwise stated - $, € prices shown as a guideline only
Web Wiz Ltd, Unit 10E Dawkins Road Ind. Est, Poole, Dorset, UK, BH15 4JD
Copyright ©2001-2012 Web Wiz - All rights reserved