Author |
Topic  |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 17 January 2003 : 11:57:34
|
On my forum, just one topic got this error message
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''Viewing : <a href="link.asp?TOPIC_ID=66">Who's going to Carlisle?</a>')'. /nyjs/forum/inc_locate.asp, line 393
I was wondering what it could be, since all the other new and old topics work fine. Im using 3.4.03
Here is the code from inc_locate.asp ---------------------------------------- <% Dim strOnlinePathInfo, strOnlineQueryString, strOnlineLocation Dim strOnlinePageName, iOnlinePathLen strOnlinePathInfo = Request.ServerVariables("Path_Info") strReferer = Request.ServerVariables("HTTP_REFERER") strRefpath = "<a href=""" & strReferer & """>" strOnlineQueryString = Request.QueryString iOnlineForumID = Request.QueryString("FORUM_ID") iOnlineTopicID = Request.QueryString("TOPIC_ID") iOnlinePathLen = InStrRev(strOnlinePathInfo,"/",-1) strOnlinePageName = lcase(Right(strOnlinePathInfo,(len(strOnlinePathInfo)-iOnlinePathLen))) strOnlineLocation = "<a href=""" & strOnlinePageName & """>" if strOnlineQueryString <> "" then strOnlineLocation = "<a href=""" & strOnlinePageName & "?" & strOnlineQueryString & """>" strOnlineLocation2 = strOnlinePageName & "?" & strOnlineQueryString end if Select Case strOnlinePageName Case "active.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Active Topics") else strOnlineLocation = strOnlinePageName end if Case "active_polls.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Active Polls") else strOnlineLocation = strOnlinePageName end if Case "cal.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Events Calendar") else strOnlineLocation = strOnlinePageName end if Case "members.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Members") else strOnlineLocation = strOnlinePageName end if Case "search.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Search") else strOnlineLocation = strOnlinePageName end if Case "events2.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Events Calendar") else strOnlineLocation = strOnlinePageName end if Case "events.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Events Calendar") else strOnlineLocation = strOnlinePageName end if Case "faq.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "FAQ") else strOnlineLocation = strOnlinePageName end if Case "filelibrary.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "FileLibrary") else strOnlineLocation = strOnlinePageName end if Case "file_lister.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "File Lister") else strOnlineLocation = strOnlinePageName end if Case "res_livenews.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Live News") else strOnlineLocation = strOnlinePageName end if Case "liquidchat.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Chat") else strOnlineLocation = strOnlinePageName end if Case "photo_album.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Photo Album") else strOnlineLocation = strOnlinePageName end if Case "member_stats.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Statistics") else strOnlineLocation = strOnlinePageName end if Case "pm_view.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Private Message Inbox") else strOnlineLocation = strOnlinePageName end if Case "pm_options.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Private Messages Options") else strOnlineLocation = strOnlinePageName end if Case "privatesend.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Sending Private Message") else strOnlineLocation = strOnlinePageName end if Case "privateread.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Reading Private Message") else strOnlineLocation = strOnlinePageName end if Case "policy.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Registration Policy") else strOnlineLocation = strOnlinePageName end if Case "post_info.asp" if strForumlogsw2 = 1 then strOnlineLocation = "<font color=""ffff00"">Posted : " & (strRefpath & "Here</font>") else strOnlineLocation = "<font color=""ffff00"">" & strOnlinePageName & "</font>" end if Case "register.asp" if strForumlogsw2 = 1 then if Request.QueryString("mode") = "Register" Then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Registration Form") else if Request.QueryString("mode") = "DoIt" Then strOnlineLocation = "<font color=""ffff00"">Register : " & (strOnlineLocation & "Register New Member</font>") end if end if else if Request.QueryString("mode") = "Register" Then strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" else if Request.QueryString("mode") = "DoIt" Then strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" end if end if end if Case "sitenews.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Site News") else strOnlineLocation = strOnlinePageName end if Case "resources.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Resources") else strOnlineLocation = strOnlinePageName end if Case "active_users.asp" if strForumlogsw2 = 1 then strOnlineLocation = "<font color=""ffff00"">Viewing : " & (strOnlineLocation & "Active Users</font>") else strOnlineLocation = "<font color=""ffff00"">" & strOnlinePageName & "</font>" end if Case "guestbook.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "GuestBook") else strOnlineLocation = strOnlinePageName end if Case "default.asp" if strForumlogsw2 = 1 then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Forums") else strOnlineLocation = strOnlinePageName end if Case "clear_forumlog.asp" if strForumlogsw2 = 1 then strOnlineLocation = "<font color=""#ff0000"">Viewing : " & strOnlineLocation & " Admin Options</font>" else strOnlineLocation = "<font color=""#ff0000"">" & strOnlinePageName & "</font>" end if Case "pop_profile.asp" if strForumlogsw2 = 1 then If Request.QueryString("mode") = "Display" Then strOnlineLocation = "Viewing : " & (strOnlineLocation & "Members Profile") else strOnlineLocation = "Viewing : " & (strOnlineLocation & "Profile") end If else If Request.QueryString("mode") = "Display" Then strOnlineLocation = strOnlineLocation2 else strOnlineLocation = strOnlineLocation2 end If end if Case "forum.asp" if strForumlogsw2 = 1 then If Request.QueryString("FORUM_ID") <> "" Then set rst = my_conn.execute("SELECT FORUM_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Request.QueryString("FORUM_ID")) Forum_Subject = rst("F_SUBJECT") rst.close set rst = nothing strOnlineLocation = "Viewing : <a href=""link.asp?FORUM_ID=" & Request.QueryString("FORUM_ID") & """>" end if strOnlineLocation = strOnlineLocation & Forum_Subject else If Request.QueryString("FORUM_ID") <> "" Then set rst = my_conn.execute("SELECT FORUM_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Request.QueryString("FORUM_ID")) Forum_Subject = rst("F_SUBJECT") rst.close set rst = nothing strOnlineLocation = strOnlineLocation2 end if end if Case "topic.asp" if strForumlogsw2 = 1 then if Request.QueryString("ARCHIVE") = "true" Then strOnlineLocation = strOnlineLocation & "Viewing Archived Message" else if Request.Querystring("TOPIC_ID") <> "" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "Viewing : <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """>" strOnlineLocation = strOnlineLocation & Topic_Subject end if end if else if Request.QueryString("ARCHIVE") = "true" Then strOnlineLocation = strOnlinePageName else if Request.Querystring("TOPIC_ID") <> "" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = strOnlineLocation2 end if end if end if Case "post.asp" if strForumlogsw2 = 1 then if Request.QueryString("method") = "Reply" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">Reply : <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """></font>" strOnlineLocation = strOnlineLocation & Topic_Subject elseif Request.QueryString("method") = "ReplyQuote" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">Reply Quote: <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """></font>" strOnlineLocation = strOnlineLocation & Topic_Subject elseif Request.QueryString("method") = "TopicQuote" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">Topic Quote: <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """></font>" strOnlineLocation = strOnlineLocation & Topic_Subject elseif Request.QueryString("method") = "Topic" Then set rst = my_conn.execute("SELECT FORUM_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Request.QueryString("FORUM_ID")) Forum_Subject = rst("F_SUBJECT") rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">New Topic : <a href=""link.asp?FORUM_ID=" & Request.QueryString("FORUM_ID") & """></font>" strOnlineLocation = strOnlineLocation & Forum_Subject elseif Request.QueryString("method") = "EditTopic" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">Edit Topic : <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """></font>" strOnlineLocation = strOnlineLocation & Topic_Subject elseif Request.QueryString("method") = "Edit" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">Edit Reply : <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """></font>" strOnlineLocation = strOnlineLocation & Topic_Subject else strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" end if else if Request.QueryString("method") = "Reply" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" elseif Request.QueryString("method") = "ReplyQuote" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" elseif Request.QueryString("method") = "TopicQuote" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" elseif Request.QueryString("method") = "Topic" Then set rst = my_conn.execute("SELECT FORUM_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Request.QueryString("FORUM_ID")) Forum_Subject = rst("F_SUBJECT") rst.close set rst = nothing strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" else strOnlineLocation = "<font color=""ffff00"">" & strOnlineLocation2 & "</font>" end if end if Case else if strForumlogsw2 = 1 then if lcase(instr(strOnlinePathInfo, "admin_")) > 0 Then strOnlineLocation = "<font color=""#ff0000"">Viewing : " & (strOnlineLocation & "Admin Options </font>") end if end if if strForumlogsw2 = 0 then if lcase(instr(strOnlinePathInfo, "admin_")) > 0 Then strOnlineLocation = "<font color=""#ff0000"">" & strOnlinePageName & "</font>" end if end if End Select
if strForumlogsw2 = 1 then
strOnlineLocation = strOnlineLocation & "</a>" else strOnlineLocation = strOnlineLocation end if
if strForumlogsw = 1 then Set objFSO = Server.CreateObject("Scripting.FileSystemObject") IF objFSO.FileExists(server.mappath(strForumlogURL & strForumlog)) then strjFileSize = objFSO.GetFile(server.mappath(strForumlogURL & strForumlog)).Size if Int(strjFileSize) < Int(strLGlimit) then Set objFSO = nothing strDateTime = strForumTimeAdjust strOnlineUserIP = Request.ServerVariables("REMOTE_ADDR") strScriptName = Request.servervariables("script_name") if strDBNTUserName = "" then strOnlineUser = "Guest" else strOnlineUser = strDBNTUserName end if Set objConn = Server.CreateObject("ADODB.Recordset") FL2_ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strForumlogURL & strForumlog) strSQL = "insert into tblLog (Name, Dte, IP, Location) values ('" & strOnlineUser & "','" & strDateTime & "','" & strOnlineUserIP & "','" & strOnlineLocation & "')" objConn.Open strSQL, FL2_ConnString Set objConn = Nothing Else End If end if end if %> -------------------- |
Edited by - ruirib on 17 January 2003 11:58:50 |
|
OneWayMule
Dev. Team Member & Support Moderator
    
Austria
4969 Posts |
|
havvoc
New Member

92 Posts |
Posted - 17 January 2003 : 13:47:06
|
Sounds like maybe a bug in the forumlog mod, need more info Are you using the newest ForumLogdb version 2.2 ? How was the post made: new topic, edit topic, reply topic ...? If you looked at the code, line 393 is the end if, which does us no good as to how the error occured.
|
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 17 January 2003 : 15:17:43
|
sorry about the code posting. Im using version 3.4.03, using a sql 7 database. Installed mods are: Active Users Admin Html Admin Tools Advanced Search Avitar Mod Color Picker F.A.Q. Administration Hacker Detection Hot Keys Inactive Users Forum Logger Mod Commander Mouse Over Topic My Avatar Mod News Calandar News Letter News Mod Photo Album PM Pager Private Messages Site Intergeration Smile Manager Spell Checker
The version of the forum mod is 2.2 When some one goes to view a post they get the error message. If you go here you should get the same thing http://www.dmcom.net/nyjs/forum/topic.asp?TOPIC_ID=67 This is the second post that has done it. I have no clue why it is happening. It only seems to be happing in the one forum. None of the others seem to be affected. |
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 17 January 2003 : 15:21:29
|
thats forum logger 2.2 |
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 17 January 2003 : 15:23:33
|
oh yea and line 393 is this code:
objConn.Open strSQL, FL2_ConnString
|
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 17 January 2003 : 15:30:26
|
It looks like its being cause by apostrophe's in the subject line. Every post that this has happend to has on in the subject line. Maybe this helps out a bit. |
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 18 January 2003 : 10:40:31
|
i took out the line objConn.Open strSQL, FL2_ConnString and it seem to work. SO i took out all of the apostrophe's in the subject line and put the line back in. Does anybody know why this happened? |
 |
|
havvoc
New Member

92 Posts |
Posted - 18 January 2003 : 14:03:22
|
The ForumLog Mod hasn't been tested with SQL and the log database uses an access 2000 connection string. If you keep having problems with it, turn the "links" off and see if that gets rid of the errors. I don't have access to SQL so I can't really help you with it. I tried some test posts on my forums and apostrophe's didn't seem to effect it. |
 |
|
havvoc
New Member

92 Posts |
Posted - 19 January 2003 : 03:55:53
|
Hey guy sorry about the delay, it seems this is a strange bug because I found this happening on my machine also. Anyway, I think I have a fix for you.
Find this code about line 227 in inc_locate.asp::
Case "topic.asp" if strForumlogsw2 = 1 then if Request.QueryString("ARCHIVE") = "true" Then strOnlineLocation = strOnlineLocation & "Viewing Archived Message" else if Request.Querystring("TOPIC_ID") <> "" Then set rst = my_conn.execute("SELECT TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & Request.Querystring("TOPIC_ID")) if not rst.eof then Topic_Subject = rst("T_SUBJECT") end if rst.close set rst = nothing strOnlineLocation = "Viewing : <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """>" strOnlineLocation = strOnlineLocation & Topic_Subject end if end if
WHERE IT SAYS:
Topic_Subject = rst("T_SUBJECT")
REPLACE THAT LINE WITH THIS ONE:
Topic_Subject = Replace(rst("T_SUBJECT"), "'", "''")
That fixed it on my machine, wierd one. Thanks for your info. Let me know if that does the trick |
 |
|
8minus1
Starting Member
USA
11 Posts |
Posted - 19 February 2003 : 11:21:01
|
sorry it took so long to get back. when i changed it i got this error.
Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression ''Viewing : <a href="link.asp?TOPIC_ID=96">how many nyj's going to the j-body bash?</a>')'.
/nyjs/forum/inc_locate.asp, line 393
so i turned off the links in the forum logger and it fixed the problem, odd though. |
 |
|
|
Topic  |
|