Author |
Topic |
thephantomnl
New Member
Netherlands
66 Posts |
Posted - 29 July 2001 : 17:10:17
|
when trying to delete all topics with the archief function i get this error:
Microsoft JET Database Engine fout '80040e14' De component WHERE bevat een syntaxisfout.
/forumv33/admin_forums.asp, regel 676
(the component has an syntaxerror ...... line 676)
with selected forums it works fine
Edited by - thephantomnl on 29 July 2001 17:10:58 |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 05:43:50
|
changing the subdeletestuff function to the one below should fix it
Sub subdeletestuff(fstrid) Dim fIDSQL '#### create FORUM_ID clause rqID = request("id") on error resume next testID = cLng(rqID) if err.number = 0 then if rqID <> "-1" then fIDSQL = "WHERE FORUM_ID=" & rqID else fIDSQL = "" end if err.clear else fIDSQL = "WHERE FORUM_ID IN (" & rqID & ")" err.clear end if on error goto 0 strsql = "DELETE FROM " & strTablePrefix & "TOPICS " & fIDSQL my_conn.execute(strsql) strsql = "DELETE FROM " & strTablePrefix & "REPLY " & fIDSQL my_conn.execute(strsql) Call subdoupdates() End Sub
|
|
|
thephantomnl
New Member
Netherlands
66 Posts |
Posted - 30 July 2001 : 07:44:32
|
euhhhhhhhhh sorry but i get now the error:
Microsoft JET Database Engine fout '80040e14' Syntaxisfout (operator ontbreekt) in query-expressie FORUM_ID=.
/forumv33/admin_forums.asp, regel 673
(operator is missing)
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 07:56:08
|
could you tell me exactly which link you are selecting, it looks like it is not passing a variable
|
|
|
thephantomnl
New Member
Netherlands
66 Posts |
Posted - 30 July 2001 : 08:33:34
|
yes:
the link in the forum is: admin_forums.asp?action=delete&id=-1&confirm=true it is the link all forums, above the link selected forums .
if you want to have access to my sit just sent me an e-mail and you get the username for admin.
(error from webserver win2000 av is different than pws server)
Microsoft JET Database Engine error '80040e14' Syntax error in WHERE clause.
/forumv33/admin_forums.asp, line 676
Edited by - thephantomnl on 30 July 2001 08:36:07 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 09:41:11
|
In the above fix, I have highlighted a line in red, replace it with
fIDSQL = " WHERE FORUM_ID > 0"
|
|
|
thephantomnl
New Member
Netherlands
66 Posts |
Posted - 30 July 2001 : 10:36:57
|
same error but this seems to work:
Sub subdeletestuff(fstrid) rqID = request("id") Dim fIDSQL'#### create FORUM_ID clause rqID = request("id") on error resume next testID = cLng(rqID) if err.number = 0 then if rqID <> "-1" then fIDSQL = "WHERE FORUM_ID=" & rqID else fIDSQL = "" end if err.clear else fIDSQL = "WHERE FORUM_ID IN (" & rqID & ")" err.clear end if on error goto 0 strsql = "DELETE FROM " & strTablePrefix & "TOPICS " & fIDSQL my_conn.execute(strsql) strsql = "DELETE FROM " & strTablePrefix & "REPLY " & fIDSQL my_conn.execute(strsql) Call subdoupdates() End Sub
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 July 2001 : 13:03:17
|
quote:
same error but this seems to work:
Sub subdeletestuff(fstrid) rqID = request("id") Dim fIDSQL'#### create FORUM_ID clause rqID = request("id") on error resume next testID = cLng(rqID) if err.number = 0 then if rqID <> "-1" then fIDSQL = "WHERE FORUM_ID=" & rqID else fIDSQL = "" end if err.clear else fIDSQL = "WHERE FORUM_ID IN (" & rqID & ")" err.clear end if on error goto 0 strsql = "DELETE FROM " & strTablePrefix & "TOPICS " & fIDSQL my_conn.execute(strsql) strsql = "DELETE FROM " & strTablePrefix & "REPLY " & fIDSQL my_conn.execute(strsql) Call subdoupdates() End Sub
almost, if you look at my original fix, the line in blue should say rqID = fstrid
|
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 31 July 2001 : 23:44:17
|
is this the complete fix?
quote:
Sub subdeletestuff(fstrid) Dim fIDSQL '#### create FORUM_ID clause rqID = request("id") on error resume next testID = cLng(rqID) if err.number = 0 then if rqID <> "-1" then fIDSQL = "WHERE FORUM_ID=" & rqID else fIDSQL = "" end if err.clear else fIDSQL = "WHERE FORUM_ID IN (" & rqID & ")" err.clear end if on error goto 0 strsql = "DELETE FROM " & strTablePrefix & "TOPICS " & fIDSQL my_conn.execute(strsql) strsql = "DELETE FROM " & strTablePrefix & "REPLY " & fIDSQL my_conn.execute(strsql) Call subdoupdates() End Sub
Brad |
|
|
hartc
Starting Member
7 Posts |
Posted - 01 August 2001 : 06:32:08
|
quote:
Yes, I realize this, but I archived everything older than one month, and then deleted ARCHIVED topics. This cleared everything, current AND archived topics.
We are getting something similar. Without any modification at all to admin_forums.asp when using the `delete selected topics from an archive` option we receive a SQL error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'WHERE'.
/snitz3302/admin_forums.asp, line 676
Having applied the fixes in this thread and performing the same `delete selected topics from an archive` we lose all live threads and yet the archived threads remain.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 01 August 2001 : 06:37:41
|
quote:
quote:
Yes, I realize this, but I archived everything older than one month, and then deleted ARCHIVED topics. This cleared everything, current AND archived topics.
We are getting something similar. Without any modification at all to admin_forums.asp when using the `delete selected topics from an archive` option we receive a SQL error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'WHERE'.
/snitz3302/admin_forums.asp, line 676
Having applied the fixes in this thread and performing the same `delete selected topics from an archive` we lose all live threads and yet the archived threads remain.
Could you please report this as a seperate bug, it has nothing to do with this bug or fix.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 01 August 2001 : 06:42:44
|
redbrad0
you need to change rqID = request("id") to rqID = fstrid
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 01 August 2001 : 06:47:30
|
hartc
line 676 is in the code to delete all topics not in the function to delete archived topics, are you sure you are selecting the correct link
|
|
|
hartc
Starting Member
7 Posts |
Posted - 01 August 2001 : 07:18:58
|
We've found the problem.
On line #375
change:
response.write("<tr><td colspan=2><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><li><a href=""admin_forums.asp?action=delete&id=-1"">All Forums</a></font></td></tr>" & vbNewline)
to
response.write("<tr><td colspan=2><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><li><a href=""admin_forums.asp?action=deletearchive&id=-1"">All Forums</a></font></td></tr>" & vbNewline)
This will now delete all archived posts across all forums.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 01 August 2001 : 12:03:26
|
quote:
We've found the problem.
On line #375
change:
response.write("<tr><td colspan=2><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><li><a href=""admin_forums.asp?action=delete&id=-1"">All Forums</a></font></td></tr>" & vbNewline)
to
response.write("<tr><td colspan=2><font face=" & strDefaultFontFace & " size=" & strDefaultFontSize & "><li><a href=""admin_forums.asp?action=deletearchive&id=-1"">All Forums</a></font></td></tr>" & vbNewline)
This will now delete all archived posts across all forums.
thanks hartc, I had just checked all the links myself and found it too.
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 02 August 2001 : 22:21:53
|
can someone post the complete fix in one topic. I did the fix where you have to change deletearchive but not sure if there is anything else because this post looks as if you guys are just debugging. thanks.
Dayve |
|
|
Topic |
|