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
 Active users mod
 New Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Webbo
Average Member

United Kingdom
982 Posts

Posted - 10 August 2013 :  15:08:55  Show Profile  Visit Webbo's Homepage  Reply with Quote
I occasionally get the following error displaying when viewing active users with the active users mod
(http://www.snitzbitz.com/mods/details.asp?Version=All&mid=318)

quote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 5.1 Driver][mysqld-5.1.56-community]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 '==3' at line 1

/forum/active_users.asp, line 558




Line 558 is in red below:

case "forum.asp"
      strQuery = fQuery
      fForum_ID = analyzeQuery(strQuery, "FORUM_ID")
      if fForum_ID = "" then
        strPage = fLang(strLangMOD_Ls3kAU_01270)
      else
        strSql = "SELECT F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID=" & fForum_ID
        set rst = my_conn.execute(strSql)
        if rst.EOF or rst.BOF then
          strPage = fLang(strLangMOD_Ls3kAU_01270)
        else
          fSubject = rst("F_SUBJECT")
          rst.close
          set rst = nothing


It is a MySql database

Anyone have any clues?

Many thanks

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 10 August 2013 :  16:10:11  Show Profile
In "active_users.asp":


Look for the following lines (appx 821-828):

function analyzeQuery(strQuery, varName)
  strQuery = Mid(strQuery, instr(strQuery, varName)+1+Len(varName))
  if instr(strQuery, "&") then
    strQuery = Mid(strQuery, 1, instr(strQuery, "&"))
    strQuery = Mid(strQuery, 1, Len(strQuery)-1)
  end if
  analyzeQuery = strQuery 
end function

Replace it with this:

function analyzeQuery(strQuery, varName)
  strQuery = Mid(strQuery, instr(1,strQuery, varName,1)+1+Len(varName))
  if instr(strQuery, "&") then
    strQuery = Mid(strQuery, 1, instr(strQuery, "&"))
    strQuery = Mid(strQuery, 1, Len(strQuery)-1)
  end if
  analyzeQuery = strQuery 
end function
Go to Top of Page

Webbo
Average Member

United Kingdom
982 Posts

Posted - 11 August 2013 :  04:16:55  Show Profile  Visit Webbo's Homepage
Amazing Carefree, works perfectly, I don't know how you do it

Many thanks
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 11 August 2013 :  05:24:24  Show Profile
I just edit original files as fixes are found and then later compare them (because I forget so wonderfully well).
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 14 August 2013 :  05:54:20  Show Profile  Visit pierretopping's Homepage
Hi Carefree,

Wonder if you can put some light on a similar error I sometimes get when running on MS-SQL with Active_Users

Microsoft SQL Server Native Client 10.0 error '80040e14'
Incorrect syntax near '='.
/forum/active_users.asp, line 457

Only get it sometimes, and its bugging the hell out of me :o)
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 August 2013 :  17:00:22  Show Profile
Try the same fix, it sounds like it's the same problem, just from another location. I know that issue cropped up in several places in the file: lines 378, 413, 457, 558, etc.
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 15 August 2013 :  17:37:23  Show Profile  Visit pierretopping's Homepage
Will do, thanks :-)
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 13 January 2014 :  04:56:57  Show Profile  Visit pierretopping's Homepage
Hi Carefree/All

Sorry, I'm still a bit confused with this, not sure what I'm looking at.

A text version of my active_users can be seen on this link:

http://www.tredegar.co.uk/misc/active_users.txt

Any guidance will be great thanks

Pierre

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 January 2014 :  00:37:51  Show Profile
The change was made correctly, are you still experiencing the random errors?
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 14 January 2014 :  07:48:26  Show Profile  Visit pierretopping's Homepage
Hi Carfree,

Yes, about 20%-30% of the time it stops with that error, all very strange. It always seams to to somebody who is an "Active Guest" as well.

Its got me stumped, don't mind telling you

Pierre
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 14 January 2014 :  20:55:54  Show Profile
Well, let's replace the whole topic.asp section (lines 445-477) and see what happens. Save your original file.


		case "topic.asp"
			strQuery = fQuery
			fTopic_ID = analyzeQuery(strQuery, "TOPIC_ID")
			if fTopic_ID = "" or isNull(fTopic_ID) then
				strPage = fLang(strLangMOD_Ls3kAU_01270)
			else
				If Request.QueryString("ARCHIVE")>"" Then strTable="A_TOPICS" Else strTable="TOPICS"
				If Request.QueryString("TOPIC_ID")>"" Then
					If isNumeric(Request.QueryString("TOPIC_ID")) Then
						strSql="SELECT FORUM_ID, TOPIC_ID, T_SUBJECT FROM " & strTablePrefix & strTable &" WHERE TOPIC_ID=" & Request.QueryString("TOPIC_ID")
						set rst = my_conn.execute(strSql)
						if rst.EOF or rst.BOF then
							strPage = fLang(strLangMOD_Ls3kAU_01270) 
						else
							fSubject = rst("T_SUBJECT")
							fForum_ID = rst("FORUM_ID")
							rst.close
							if chkForumAccess(fForum_ID, MemberID, false) then
								strQuery = fQuery
								if lcase(analyzeQuery(strQuery, "ARCHIVE")) = "true" then
									strPage = fLang(strLangMOD_Ls3kAU_01310) & "<br><a href=""topic.asp?" & fQuery & """>"
								else
									strPage = fLang(strLangMOD_Ls3kAU_01320) & "<br><a href=""topic.asp?" & fQuery & """>"
								end if
								strPage = strPage & fSubject
							else
								strOnlineLocation = fLang(strLangMOD_Ls3kAU_01330)
							end if
						end if
						set rst = nothing
					end if
				end if
			end if

Edited by - Carefree on 16 January 2014 08:13:28
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 15 January 2014 :  16:48:54  Show Profile  Visit pierretopping's Homepage
Thanks carefree , will give it a try :-)
Go to Top of Page

pierretopping
Junior Member

United Kingdom
224 Posts

Posted - 16 January 2014 :  05:25:05  Show Profile  Visit pierretopping's Homepage
You fixed it :o)

Thanks so much :o)
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 16 January 2014 :  08:09:02  Show Profile
You're welcome.
Go to Top of Page

golfmann
Junior Member

United States
450 Posts

Posted - 06 March 2014 :  23:35:09  Show Profile  Visit golfmann's Homepage
FYI, I found what seems (so far, anyway) like a good replacement site for checking IP addresses (and domain names too for that matter)

I replaced the code for IP checks (two places) with this:

response.write "                <td bgcolor=""" & CColor & """ align=center valign=middle><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""http://www.plotip.com/ip/" & ChkString(rsAM("AU_IP"), "display") & """ target=""_blank"">" & ChkString(rsAM("AU_IP"), "display") & "</a></font></td>"  & "</font></td>" & VBNewLine


www.plotip.com

You may like it. I do. Fastest YET in all these years
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 March 2014 :  00:25:35  Show Profile
quote:
Originally posted by golfmann

FYI, I found what seems (so far, anyway) like a good replacement site for checking IP addresses (and domain names too for that matter)

I replaced the code for IP checks (two places) with this:

response.write "                <td bgcolor=""" & CColor & """ align=center valign=middle><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""http://www.plotip.com/ip/" & ChkString(rsAM("AU_IP"), "display") & """ target=""_blank"">" & ChkString(rsAM("AU_IP"), "display") & "</a></font></td>"  & "</font></td>" & VBNewLine


www.plotip.com

You may like it. I do. Fastest YET in all these years



The problem is that it's inaccurate. It put me in Australia - while I am in Oceania, the Philippines is a good distance from Aussie country.

Edited by - Carefree on 09 October 2014 08:50:04
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07