Author |
Topic  |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 14 July 2012 : 00:07:44
|
I am recieving the following error when trying to submit a correction to a REPLY.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET R_MESSAGE = ' Of all his books, I believe this one best tells his life st' at line 1
/tfp/post_info.asp, line 394
Here are lines 379-405:
'## Forum_SQL - Do DB Update sstrSql = "UPDATE " & strActivePrefix & "REPLY " strSql = strSql & " SET R_MESSAGE = '" & txtMessage & "'" strSql = strSql & ", R_MSGICON = " & cLng(Request.Form("strMessageIcon")) if Request.Form("sig") = "yes" and strDSignatures = "1" then strSql = strSql & ", R_SIG = 1" else strSql = strSql & ", R_SIG = 0" end if if mLev < 4 and strEditedByDate = "1" then strSql = strSql & ", R_LAST_EDIT = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", R_LAST_EDITBY = " & MemberID end if strSql = strSql & " WHERE REPLY_ID=" & Reply_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords if mLev <> 4 and Moderation = "No" then '## Forum_SQL - Update Last Post strSql = " UPDATE " & strTablePrefix & "FORUM" strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", F_LAST_POST_AUTHOR = " & MemberID strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID strSql = strSql & ", F_LAST_POST_REPLY_ID = " & Reply_ID strSql = strSql & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Here is also a copy of my entire post_info.asp in txt format.
post_info.asp in txt format
Any suggestions?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 14 July 2012 : 04:43:56
|
quote: Originally posted by HuwR
does this happen when editing all replies ?
Yes, not the topic but the replies to a topic, or at least all of them I've tried to edit.
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 14 July 2012 : 04:49:27
|
I just tried to edit the first post of the topic (the post you create a topic with) and received this error:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/tfp/post.asp, line 411
The error in my post above is when I click on submit after editing a REPLY to this post here I am referring. Hope that makes sense. 
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 14 July 2012 05:15:40 |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 14 July 2012 : 08:42:53
|
Delete the first letter "s" on line 380. That routine looks like this, with the letter in red being the culprit:
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
sstrSql = "UPDATE " & strActivePrefix & "REPLY "
|
Edited by - Carefree on 14 July 2012 08:44:04 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 14 July 2012 : 10:55:06
|
quote: Originally posted by Carefree
Delete the first letter "s" on line 380. That routine looks like this, with the letter in red being the culprit:
if Err_Msg = "" then
'## Forum_SQL - Do DB Update
sstrSql = "UPDATE " & strActivePrefix & "REPLY "
THANK YOU!!!
That got rid of one of the errors, the one I was receiving when I click on submit after editing a REPLY.
I am still receiving this error below when I click to edit the main post of a topic.
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/tfp/post.asp, line 411
Here are lines 405-427
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'## Forum_SQL - Update Last Post strSql = " UPDATE " & strActivePrefix & "TOPICS" strSql = strSql & " SET T_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" strSql = strSql & ", T_LAST_POST_AUTHOR = " & MemberID strSql = strSql & ", T_LAST_POST_REPLY_ID = " & Reply_ID strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords end if
if Moderation = "No" then '## Subscribe checkbox start ## if request.form("TNotify") <> "" then if request.form("TNotify") = "1" then AddSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID else DeleteSubscription "TOPIC", MemberID, Cat_ID, Forum_ID, Topic_ID end if end if '## Subscribe checkbox end ## end if
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 26 July 2012 : 00:28:39
|
I rewrote this routine and discovered that it was caused by the topic rating mod trying to assign a value without ever querying the content of the field. All fixed. |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 26 July 2012 : 01:20:33
|
Thank you so much once again, Carefree!
Your help is so very, very appreciated!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
|
Topic  |
|
|
|