Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Syntax to use near ' F_COUNT = F_COUNT + 1 WHERE?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

sikandar
Junior Member

Pakistan
135 Posts

Posted - 22 September 2008 :  12:59:39  Show Profile
Hi,
I made no change in code or anywhere just getting following error from today morning. Is there any problem with the database or any other thing is causing the issue. Thanks

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[MySQL][ODBC 3.51 Driver][mysqld-4.0.24-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 ' F_COUNT = F_COUNT + 1 WHERE FORUM_ID = 23' at line 1

/post_info.asp, line 1464

<Moved to Help: MOD Implementation as it is for a MOD><

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 22 September 2008 :  18:02:50  Show Profile  Send ruirib a Yahoo! Message
You will need to print out the whole SQL statement before we can help.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

sikandar
Junior Member

Pakistan
135 Posts

Posted - 23 September 2008 :  00:29:23  Show Profile
Everything was working and all of a sudden yesterday morning without any change the error started. This code is working for last couple of years. Anyway pasting the code. Thanks

if SecretAllowed <> 1 and Request.Form("Secret") <> "yes" then
'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "FORUM "
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID")
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NawReplyID
strSql = strSql & ", F_COUNT = F_COUNT + 1 "
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID

>> line 1464 my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
else
'## Forum_SQL - Update Unmoderated post count
strSql = "UPDATE " & strActivePrefix & "TOPICS "
strSql = strSql & " SET T_UREPLIES = T_UREPLIES + 1 "
strSql = strSql & " WHERE TOPIC_ID = " & Topic_ID

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if

if Err.description <> "" then
Go_Result fLangN(strLangPost_Info00150,Err.description), 0
Response.End
else
'if Moderation = "No" then
ProcessSubscriptions rs("MEMBER_ID"), Cat_ID, Forum_ID, Topic_ID, Moderation
'end if
<
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2085 Posts

Posted - 23 September 2008 :  01:03:20  Show Profile
This is part of a mod as we do not have if SecretAllowed <> 1 and Request.Form("Secret") <> "yes" in the base code:

You have:
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NawReplyID

Should this not be:
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NewReplyID

if SecretAllowed <> 1 and Request.Form("Secret") <> "yes" then 
'## Forum_SQL 
strSql = "UPDATE " & strTablePrefix & "FORUM " 
strSql = strSql & " SET F_LAST_POST = '" & DateToStr(strForumTimeAdjust) & "'" 
strSql = strSql & ", F_LAST_POST_AUTHOR = " & rs("MEMBER_ID") 
strSql = strSql & ", F_LAST_POST_TOPIC_ID = " & Topic_ID 
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & NewReplyID 
strSql = strSql & ", F_COUNT = F_COUNT + 1 " 
strSql = strSql & " WHERE FORUM_ID = " & Forum_ID 

my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords 
end if

<

Cheers,

David Greening
Go to Top of Page

sikandar
Junior Member

Pakistan
135 Posts

Posted - 23 September 2008 :  01:56:39  Show Profile
Excellent observation. I did not make this change so now trying to find out how it is changed. Thanks for the solution.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 23 September 2008 :  03:23:09  Show Profile  Visit HuwR's Homepage
we also don't have this fLangN(strLangPost_Info00150,Err.description) function in snitz, so maybe you are using a modded forum like Image's forum, if so you should post any problems there not here.<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.49 seconds. Powered By: Snitz Forums 2000 Version 3.4.07