Author |
Topic |
|
MarsBar
Starting Member
49 Posts |
Posted - 29 July 2005 : 22:00:30
|
Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression 'FORUM_PM.M_TO = OR FORUM_PM.M_FROM ='. /pop_delete.asp, line 318
I believe something I did installing one or the other of these mods is causing the above error when I delete a topic. I used the actual pop_delete from the poll mod so I suspect it is the pm mod. If I cancel the pop up deletion box (which is where the message appears) and refresh the page then the topic is deleted.
Here is a text version of my pop_delete.
http://www.geocities.com/whitecrow2462/pop_delete.txt
Mark
|
Edited by - MarsBar on 01 August 2005 18:59:49 |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 02 August 2005 : 02:12:58
|
I think you should delete the Private Message SQL code from around line 318. It's not supposed to be deleting any PM's when you are delting a topic. Only when you are deleting a Member.
'## Forum_SQL - Delete Private Messages that the user has sent or received
strSql = "DELETE FROM " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strTablePrefix & "PM.M_TO = " & Member_ID
strSql = strSql & " OR " & strTablePrefix & "PM.M_FROM = " & Member_ID
my_Conn.Execute(strSql) |
Support Snitz Forums
|
|
|
MarsBar
Starting Member
49 Posts |
Posted - 11 August 2005 : 21:55:58
|
Hello Davio and thanks for the reply. I edited as suggested and I get the same error, just a different line
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'FORUM_PM.M_TO = OR FORUM_PM.M_FROM ='.
/pop_delete.asp, line 315
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 11 August 2005 : 22:11:59
|
What does your SQL statement look like before it is being used? |
|
|
MarsBar
Starting Member
49 Posts |
Posted - 11 August 2005 : 22:19:47
|
Hello Anon. Newbie here so excuse my ignorance. I don't understand your question. If you mean the popup window before the error, it appears correctly.
Mark |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 11 August 2005 : 22:33:46
|
In your code, somewhere before line 315, you will see something like:
my_Conn.Execute(strSql)
Right before that, add:
Response.Write(strSql)
Response.End
This will tell the script to write out the SQL statement and then stop execution. Somewhere near the bottom of the page you will see the SQL Statment, "Select ... From ..." etc.
The problem lies with the syntax of your SQL statement. And the question is where. By writing it out like this, we can start trying to rule out the simple stuff... (ah, the hours I've spent looking at the complex, when it was just a missing ";" ) |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 11 August 2005 : 23:29:51
|
You deleted the wrong code if you get back the same error message on a line 3 lines above. I told you to delete 6 lines of code that came from the PM mod. Let me quote it again:'## Forum_SQL - Delete Private Messages that the user has sent or received
strSql = "DELETE FROM " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strTablePrefix & "PM.M_TO = " & Member_ID
strSql = strSql & " OR " & strTablePrefix & "PM.M_FROM = " & Member_ID
my_Conn.Execute(strSql) This is lines 313 to 318. If you delete the correct lines and upload back the file, you will NOT get back the same error. If you do, your server might be caching the file.
If you get back the same error, update your pop_delete.txt file so I can see the changes you made. |
Support Snitz Forums
|
Edited by - Davio on 11 August 2005 23:30:35 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 12 August 2005 : 11:25:26
|
Any luck? |
|
|
MarsBar
Starting Member
49 Posts |
Posted - 12 August 2005 : 20:01:27
|
I beleive it must have been a cache problem because I went back and deleted the same block as last night, this time with good results.
Thank you both Very much for sticking with me through this one. I could still delete topics but it certainly was annoying.
Thanks again!
Mark |
|
|
|
Topic |
|