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: General / Classic ASP versions(v3.4.XX)
 3.4.07?
 New Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Zenfor
Junior Member

372 Posts

Posted - 06 May 2013 :  21:36:15  Show Profile
Anyone??


Edited by - Zenfor on 06 May 2013 21:36:45
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 06 May 2013 :  22:42:30  Show Profile
Look at lines 191-205


	if strAge = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_AGE FROM " & strMemberTablePrefix & "MEMBERS WHERE M_AGE <> '' AND M_STATUS <> 0 ORDER BY M_AGE ASC", 1))
		if not rs.eof then
			intYoungest = cInt(rs("M_AGE"))
		end if
		rs.close
		set rs = nothing
	elseif strAgeDOB = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB <> '' AND M_STATUS <> 0 ORDER BY M_DOB DESC", 1))
		if not rs.eof then
			intYoungest = cInt(DisplayUsersAge(DOBToDate(rs("M_DOB"))))
		end if
		rs.close
		set rs = nothing
	end if


Change them to this:


	if strAge = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_AGE FROM " & strMemberTablePrefix & "MEMBERS WHERE M_AGE <> '' AND M_STATUS <> 0 ORDER BY M_AGE ASC", 1))
		if not rs.eof then
			intYoungest = cLng(rs("M_AGE"))
		end if
		rs.close
		set rs = nothing
	elseif strAgeDOB = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB <> '' AND M_STATUS <> 0 ORDER BY M_DOB DESC", 1))
		if not rs.eof then
			intYoungest = cLng(DisplayUsersAge(DOBToDate(rs("M_DOB"))))
		end if
		rs.close
		set rs = nothing
	end if


Edited by - Carefree on 06 May 2013 22:45:20
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 07 May 2013 :  07:36:39  Show Profile
Tried that Carefree and now I get this. Thanks!

Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 07 May 2013 :  11:45:09  Show Profile
OK - you must have an age which isn't numeric in value. That's fixable. Change the block of code to this (it'll update any non-numeric value to 0).


	intYoungest = 0
	if strAge = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_AGE FROM " & strMemberTablePrefix & "MEMBERS WHERE M_AGE <> '' AND M_STATUS <> 0 ORDER BY M_AGE ASC", 1))
		if not rs.eof then
			If not isNumeric(rs("M_AGE")) Then
				my_Conn.Execute("UPDATE " & strMemberTablePrefix & "MEMBERS SET M_AGE=0 WHERE MEMBER_ID=" & rs("MEMBER_ID"))
			End If
			intYoungest = cLng(rs("M_AGE"))
		end if
		rs.close
		set rs = nothing
	elseif strAgeDOB = "1" then
		set rs = my_Conn.execute(TopSQL("SELECT M_DOB FROM " & strMemberTablePrefix & "MEMBERS WHERE M_DOB <> '' AND M_STATUS <> 0 ORDER BY M_DOB DESC", 1))
		if not rs.eof then
			intYoungest = cLng(DisplayUsersAge(DOBToDate(rs("M_DOB"))))
		end if
		rs.close
		set rs = nothing
	end if
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 07 May 2013 :  16:13:57  Show Profile
Thanks again but still getting an error, this one different:



This is line 195
quote:
my_Conn.Execute("UPDATE " & strMemberTablePrefix & "MEMBERS SET M_AGE=0 WHERE MEMBER_ID=" & rs("MEMBER_ID"))
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 08 May 2013 :  00:41:22  Show Profile
Disregard the following:


That means you're missing the "M_Age" field in the table.

Save the following as "dbs_mage.asp" in your forum folder. Then run it from the admin console "Mod Setup" link. After that, the member details should work.

[scrollcode][code]
M_Age Fix

[ALTER]
MEMBERS
ADD#M_AGE#TEXT(3)#NULL#
[END]

Edited by - Carefree on 08 May 2013 04:19:16
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 May 2013 :  02:21:09  Show Profile
You sure Carefree? My first thought, from the code on line 195, was that it had a problem with rs("MEMBER_ID").

If you look at line 192, with the SELECT statement, it is only selecting the M_AGE.
quote:
set rs = my_Conn.execute(TopSQL("SELECT M_AGE FROM " & strMemberTablePrefix & "MEMBERS WHERE M_AGE <> '' AND M_STATUS <> 0 ORDER BY M_AGE ASC", 1))


So you wouldn't be able to reference MEMBER_ID using rs("MEMBER_ID") on line 195.

Support Snitz Forums

Edited by - Davio on 08 May 2013 02:21:56
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 08 May 2013 :  04:18:43  Show Profile
You're right, missed that. The previous fix should work if he changes the select to:

set rs = my_Conn.execute(TopSQL("SELECT * FROM " & strMemberTablePrefix & "MEMBERS WHERE M_AGE <> '' AND M_STATUS <> 0 ORDER BY M_AGE ASC", 1))

Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 08 May 2013 :  07:15:20  Show Profile
Great work guys, no errors!!

Thank you very much for the help.

I'm now going to install the calendar mod, hopefully that will go OK.

Thanks again, you guys are the best...
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 08 May 2013 :  09:55:43  Show Profile
You're welcome.
Go to Top of Page

Zenfor
Junior Member

372 Posts

Posted - 13 May 2013 :  07:21:08  Show Profile
Moving right along...

Thanks to everyones help I got the 3.4.07 forum up and running with the new calendar mod, my key mod.

Implementation Strategy:
My question now is, since I used and updated my original forum database some 10 days ago, should I just leave things how they are or should I try to copy and update the current database again to the new forum. My gut feeling says no, since it appears it is running OK and I have my key calendar mod working, live with the 10 day lapse and change the old forum directory folder to forum_old and rename and point to the new folder to get started. I do plan to be adding more mods along the way to the new live forum but I think I'm ready to switch over. Thank you!

Any comments? Thank you!
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07